Skip to content
Snippets Groups Projects
Verified Commit e4b1b075 authored by nd's avatar nd
Browse files

sort roles on user list, move buttons out of table. See #53

parent 35ee923f
No related branches found
No related tags found
No related merge requests found
...@@ -3,14 +3,6 @@ ...@@ -3,14 +3,6 @@
{% block body %} {% block body %}
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<table class="table table-striped table-sm">
<thead>
<tr>
<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"> <p class="text-right">
<a class="btn btn-primary" href="{{ url_for("user.show") }}"> <a class="btn btn-primary" href="{{ url_for("user.show") }}">
<i class="fa fa-plus" aria-hidden="true"></i> New <i class="fa fa-plus" aria-hidden="true"></i> New
...@@ -19,7 +11,14 @@ ...@@ -19,7 +11,14 @@
<i class="fa fa-file-csv" aria-hidden="true"></i> CSV import <i class="fa fa-file-csv" aria-hidden="true"></i> CSV import
</button> </button>
</p> </p>
</th> <table class="table table-striped table-sm">
<thead>
<tr>
<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"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -37,7 +36,7 @@ ...@@ -37,7 +36,7 @@
{{ user.displayname }} {{ user.displayname }}
</td> </td>
<td> <td>
{% for role in user.roles %} {% for role in user.roles|sort(attribute="name") if not role.name in config["ROLES_BASEROLES"] %}
<a href="{{ url_for("role.show", roleid=role.id) }}">{{ role.name }}</a>{% if not loop.last %}, {% endif %} <a href="{{ url_for("role.show", roleid=role.id) }}">{{ role.name }}</a>{% if not loop.last %}, {% endif %}
{% endfor %} {% endfor %}
</td> </td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment