This commit is contained in:
Ross
2022-05-25 16:50:18 +01:00
parent 41a09ea30d
commit 5701c8d613
30 changed files with 402 additions and 226 deletions
+21 -6
View File
@@ -2,14 +2,29 @@
{% block content %}
<h2>Users</h2>
<details class="filter">
<summary>
Filter users list
</summary>
<form method="get">
{{ filter.form.as_p }}
<input type="submit" />
</form>
</details>
<ul>
{% for user in object_list %}
<li>Username: <a href="{% url 'account_profile' user.username %}">{{ user.username }}</a><br/>
Name: {{user.first_name}} {{user.last_name}}<br/>
Registration number: {{user.registration_number}}
<button class="small-url-button"><a href="{% url 'account_update' user.username %}">Edit user</a></button>
<button class="small-url-button"><a href="{% url 'account_profile_update' user.username %}">Edit profile</a></button>
{% for list_user in object_list %}
<li>Username: <a href="{% url 'account_profile' list_user.username %}">{{ list_user.username }}</a><br/>
Name: {{list_user.first_name}} {{list_user.last_name}}<br/>
Registration number: {{list_user.registration_number}}
<button class="small-url-button"><a href="{% url 'account_update' list_user.username %}">Edit user</a></button>
<button class="small-url-button"><a href="{% url 'account_profile_update' list_user.username %}">Edit profile</a></button>
{% if user.is_superuser %}
<button class="small-url-button"><a href="{% url 'admin:auth_user_change' list_user.id %}">Admin edit</a></button>
<button class="small-url-button"><a href="{% url 'admin:auth_user_delete' list_user.id %}">Delete</a></button>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}