[useradmin] Add a is_admin column to the list user page
@@ -78,6 +78,7 @@ ${layout.menubar(section='users')}
<th>${_('First Name')}</th>
<th>${_('Last Name')}</th>
<th>${_('E-mail')}</th>
+ <th>${_('Is admin')}</th>
<th>${_('Groups')}</th>
<th>${_('Last Login')}</th>
</tr>
@@ -93,9 +94,11 @@ ${layout.menubar(section='users')}
% endif
<td>
% if is_admin(user) or user.username == listed_user.username:
- <strong><a title="${_('Edit %(username)s') % dict(username=listed_user.username)}"
+ <strong>
+ <a title="${_('Edit %(username)s') % dict(username=listed_user.username)}"
href="${ url('useradmin.views.edit_user', username=listed_user.username) }"
- data-row-selector="true">${listed_user.username}</a></strong>
+ data-row-selector="true">${listed_user.username}</a>
+ </strong>
% else:
<strong>${listed_user.username}</strong>
% endif
@@ -103,6 +106,11 @@ ${layout.menubar(section='users')}
<td>${listed_user.first_name}</td>
<td>${listed_user.last_name}</td>
<td>${listed_user.email}</td>
+ <td>
+ % if is_admin(listed_user):
+ <i class="fa fa-check"></i>
+ % endif
+ </td>
<td>${', '.join([group.name for group in listed_user.groups.all()])}</td>
<td>${date(listed_user.last_login)} ${time(listed_user.last_login).replace("p.m.","PM").replace("a.m.","AM")}</td>
</tr>
@@ -178,6 +186,7 @@ ${layout.menubar(section='users')}
null,
null,
null,
+ null,
{ "sType": "date" },
],
"oLanguage": {
