From 35ee923f852d3586042d646e9c8a32e931ab190c Mon Sep 17 00:00:00 2001
From: nd <git@notandy.de>
Date: Mon, 5 Apr 2021 16:50:13 +0200
Subject: [PATCH] condense user list, display user roles. See #53

---
 uffd/user/templates/user_list.html | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/uffd/user/templates/user_list.html b/uffd/user/templates/user_list.html
index 34102af7..ba993e0f 100644
--- a/uffd/user/templates/user_list.html
+++ b/uffd/user/templates/user_list.html
@@ -9,6 +9,7 @@
 					<th scope="col">uid</th>
 					<th scope="col">login name</th>
 					<th scope="col">display name</th>
+					<th scope="col">roles</th>
 					<th scope="col">
 						<p class="text-right">
 							<a class="btn btn-primary" href="{{ url_for("user.show") }}">
@@ -36,8 +37,13 @@
 						{{ user.displayname }}
 					</td>
 					<td>
-						<p class="text-right">
-							<a href="{{ url_for("user.show", uid=user.uid) }}" class="btn btn-primary">
+					{% for role in user.roles %}
+						<a href="{{ url_for("role.show", roleid=role.id) }}">{{ role.name }}</a>{% if not loop.last %}, {% endif %}
+					{% endfor %}
+					</td>
+					<td>
+						<p class="text-right m-0">
+							<a href="{{ url_for("user.show", uid=user.uid) }}" class="btn btn-primary btn-sm">
 								<i class="fa fa-edit" aria-hidden="true"></i> Edit
 							</a>
 						</p>
-- 
GitLab