mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-18 00:25:51 +00:00
admin blueprint
This commit is contained in:
40
app/admin/templates/_table_users.html
Normal file
40
app/admin/templates/_table_users.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<table id="report-table"
|
||||
class="table table-striped table-hover table-bordered bg-light"
|
||||
data-toggle="table"
|
||||
data-sticky-header="true"
|
||||
data-sticky-header-offset-y="65"
|
||||
data-sortable="true">
|
||||
<thead>
|
||||
<tr class="bg-primary text-white">
|
||||
<th class="text-center">Username</th>
|
||||
<th class="text-center">Email</th>
|
||||
<th class="text-center">Date Created</th>
|
||||
<th class="text-center">Last Login</th>
|
||||
<th class="text-center">Is Admin</th>
|
||||
<th class="text-center">Benchmark</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{ user.username }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
<td class="text-center">{{ user.date_created.strftime("%d-%m-%Y, %T") }}</td>
|
||||
<td class="text-center">{{ user.last_login.strftime("%d-%m-%Y, %T") }}</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" onclick="return false" {{ "checked" if user.admin else "" }}>
|
||||
</td>
|
||||
<td>{{ user.benchmark.name }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for("admin.user_edit", user_id=user.id) }}"
|
||||
class="btn btn-primary"><span><i class="mdi mdi-account"></i></span></a>
|
||||
<a href="{{ url_for("admin.user_delete", user_id=user.id) }}"
|
||||
class="btn btn-danger"><i class="mdi mdi-account-remove"></i></a>
|
||||
<a href="{{ url_for("admin.password", user_id=user.id, back="admin.users") }}"
|
||||
class="btn btn-warning"><i class="mdi mdi-lock-reset"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
Reference in New Issue
Block a user