devicehub-django/admin/templates/admin_users.html

42 lines
1.2 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% block content %}
<div class="row mb-4">
<div class="col">
<h3>{{ subtitle }}</h3>
</div>
<div class="col-2 text-end">
<a href="{% url 'admin:new_user' %}" class="btn btn-green-admin "><i class="bi bi-person-plus"></i> {% trans "New user" %}</a>
</div>
</div>
<div class="row">
<div class="col">
<table class="table table-hover table-bordered">
<thead class="table-light">
<tr>
<th scope="col">{% trans "Email" %}</th>
<th scope="col">{% trans "Admin?" %}</th>
<th scope="col" class="text-center">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for u in users %}
<tr>
<td>{{ u.email }}</td>
<td>{% if u.is_admin %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</td>
<td class="text-center">
<a href="{% url 'admin:edit_user' u.pk %}"><i class="bi bi-pencil me-4"></i></a>
<a href="{% url 'admin:delete_user' u.pk %}" class="text-danger" title="Remove"><i class="bi bi-trash"></i> </a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}