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" %}
{% set active_page = "admin_accounts" %}
{% block title %}
<title>
Account Management - {{ SITE_NAME }}
</title>
{% endblock %}
{% block title %}<title>Accounts - {{ SITE_NAME }}</title>{% endblock %}
{% block dashboard_stat %}
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">
Accounts
<small>Manage</small>
</h1>
<h1 class="m-0 text-dark">Accounts</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
@ -30,21 +21,26 @@
{% endblock %}
{% block content %}
<section class="content">
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card card-outline card-primary shadow">
<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') }}">
<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
</button>
</a>
</div>
<div class="card-body">
<table id="tbl_accounts" class="table table-bordered table-striped">
</div>
<!-- /.card-header -->
<div class="card-body table-responsive">
<table id="tbl_accounts"
class="table table-bordered table-striped table-hover table-sm records">
<thead>
<tr>
<th>Name</th>
@ -65,20 +61,25 @@
<td>{{ account.mail }}</td>
<td>{{ account.user_num }}</td>
<td>{{ account.domains|length }}</td>
<td width="15%">
<td>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa-solid fa-bars"></i>&nbsp;Actions
<button class="btn btn-primary dropdown-toggle" type="button"
id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<i class="fa-solid fa-bars"></i>
</button>
<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
</button>
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ account.name }}">
<font color="red">
<button type="button"
class="dropdown-item btn-secondary button_delete"
id="{{ account.name }}">
<span style="color: red;">
<i class="fa-solid fa-trash"></i>&nbsp;Delete Account
</font>
</span>
</button>
</div>
</div>
@ -88,15 +89,21 @@
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</section>
<!-- /.container-fluid -->
</section>
{% endblock %}
{% block extrascripts %}
<script>
// set up accounts data table
<script>
// Intialize DataTable
$("#tbl_accounts").DataTable({
"paging": true,
"lengthChange": true,
@ -132,10 +139,11 @@
})
modal.modal('show');
});
</script>
</script>
{% endblock %}
{% block modals %}
<div class="modal fade" id="modal_delete">
<div class="modal fade" id="modal_delete">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
@ -155,5 +163,5 @@
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</div>
{% endblock %}