1
0
mirror of synced 2025-10-28 18:19:17 +00:00

admin dashboard, database updated (members, groups), group setup and permissions

This commit is contained in:
Valentin PUCCETTI
2023-09-10 20:52:09 +02:00
parent 14dad1f5f1
commit a3b8a865fd
21 changed files with 723 additions and 34 deletions

54
views/admin/users.ejs Normal file
View File

@@ -0,0 +1,54 @@
<%- include('../navbar', {active: "admin-users"}); %>
<div class="container-fluid">
<h3 class="text-dark mb-4">Admin: Users</h3>
<div class="card shadow">
<div class="card-header py-3">
<p class="text-primary m-0 fw-bold">User list</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6 text-nowrap">
<div id="dataTable_length" class="dataTables_length" aria-controls="dataTable"><label class="form-label">Show&nbsp;<select class="d-inline-block form-select form-select-sm">
<option value="all" selected="">all</option>
</select>&nbsp;</label></div>
</div>
<div class="col-md-6">
<div class="text-md-end dataTables_filter" id="dataTable_filter"><label class="form-label">
<input type="search" class="form-control form-control-sm" id="tableInput" onkeyup="tableSearch()" aria-controls="dataTable" placeholder="Search"></label>
</div>
</div>
</div>
<div class="table-responsive table mt-2" id="dataTable" role="grid" aria-describedby="dataTable_info">
<table class="table my-0" id="tableEnabled">
<thead>
<tr>
<th>Display name</th>
<th>github id</th>
<th>Admin</th>
<th>Groups</th>
<th>Last login</th>
</tr>
</thead>
<tbody>
<% users.forEach(function (user) { %>
<tr>
<td><img class="rounded-circle me-2" width="30" height="30" src="<%= user.avatar %>"><%= user.displayName %></td>
<td><%= user.id %></td>
<td><%= user.admin %></td>
<td>
<span class="badge bg-primary">admin</span>
</td>
<td><%= user.updatedAt %></td>
</tr>
<% }) %>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<%- include('../footer'); %>