Completed first-found updates for the accounts list view.

This commit is contained in:
Matt Scott 2023-02-20 08:50:17 -05:00
parent a42d610759
commit 8c6fc5e262

View File

@ -1,22 +1,13 @@
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "admin_accounts" %} {% set active_page = "admin_accounts" %}
{% block title %}<title>Accounts - {{ SITE_NAME }}</title>{% endblock %}
{% block title %}
<title>
Account Management - {{ SITE_NAME }}
</title>
{% endblock %}
{% block dashboard_stat %} {% block dashboard_stat %}
<div class="content-header"> <div class="content-header">
<div class="container-fluid"> <div class="container-fluid">
<div class="row mb-2"> <div class="row mb-2">
<div class="col-sm-6"> <div class="col-sm-6">
<h1 class="m-0 text-dark"> <h1 class="m-0 text-dark">Accounts</h1>
Accounts
<small>Manage</small>
</h1>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<ol class="breadcrumb float-sm-right"> <ol class="breadcrumb float-sm-right">
@ -34,17 +25,22 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card card-outline card-primary shadow">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Account Management</h3> <h3 class="card-title">Accounts</h3>
<div class="card-tools">
<a href="{{ url_for('admin.edit_account') }}"> <a href="{{ url_for('admin.edit_account') }}">
<button type="button" class="btn btn-primary float-right button_add_account"> <button type="button" class="btn btn-primary button_add_account"
title="Add Account">
<i class="fa-solid fa-plus"></i>&nbsp;Add Account <i class="fa-solid fa-plus"></i>&nbsp;Add Account
</button> </button>
</a> </a>
</div> </div>
<div class="card-body"> </div>
<table id="tbl_accounts" class="table table-bordered table-striped"> <!-- /.card-header -->
<div class="card-body table-responsive">
<table id="tbl_accounts"
class="table table-bordered table-striped table-hover table-sm records">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -65,20 +61,25 @@
<td>{{ account.mail }}</td> <td>{{ account.mail }}</td>
<td>{{ account.user_num }}</td> <td>{{ account.user_num }}</td>
<td>{{ account.domains|length }}</td> <td>{{ account.domains|length }}</td>
<td width="15%"> <td>
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-primary dropdown-toggle" type="button"
<i class="fa-solid fa-bars"></i>&nbsp;Actions id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<i class="fa-solid fa-bars"></i>
</button> </button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu"> <div class="dropdown-menu" aria-labelledby="dropdownMenu">
<button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_account', account_name=account.name) }}'"> <button type="button" class="dropdown-item btn-warning"
onclick="window.location.href='{{ url_for('admin.edit_account', account_name=account.name) }}'">
<i class="fa-solid fa-edit"></i>&nbsp;Edit Account <i class="fa-solid fa-edit"></i>&nbsp;Edit Account
</button> </button>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ account.name }}"> <button type="button"
<font color="red"> class="dropdown-item btn-secondary button_delete"
id="{{ account.name }}">
<span style="color: red;">
<i class="fa-solid fa-trash"></i>&nbsp;Delete Account <i class="fa-solid fa-trash"></i>&nbsp;Delete Account
</font> </span>
</button> </button>
</div> </div>
</div> </div>
@ -88,15 +89,21 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<!-- /.card-body -->
</div> </div>
<!-- /.card -->
</div> </div>
<!-- /.col -->
</div> </div>
<!-- /.row -->
</div> </div>
<!-- /.container-fluid -->
</section> </section>
{% endblock %} {% endblock %}
{% block extrascripts %} {% block extrascripts %}
<script> <script>
// set up accounts data table // Intialize DataTable
$("#tbl_accounts").DataTable({ $("#tbl_accounts").DataTable({
"paging": true, "paging": true,
"lengthChange": true, "lengthChange": true,
@ -134,6 +141,7 @@
}); });
</script> </script>
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade" id="modal_delete"> <div class="modal fade" id="modal_delete">
<div class="modal-dialog"> <div class="modal-dialog">