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,6 +3,14 @@ ...@@ -3,6 +3,14 @@
{% block body %} {% block body %}
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<p class="text-right">
<a class="btn btn-primary" href="{{ url_for("user.show") }}">
<i class="fa fa-plus" aria-hidden="true"></i> New
</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#csvimport">
<i class="fa fa-file-csv" aria-hidden="true"></i> CSV import
</button>
</p>
<table class="table table-striped table-sm"> <table class="table table-striped table-sm">
<thead> <thead>
<tr> <tr>
...@@ -10,16 +18,7 @@ ...@@ -10,16 +18,7 @@
<th scope="col">login name</th> <th scope="col">login name</th>
<th scope="col">display name</th> <th scope="col">display name</th>
<th scope="col">roles</th> <th scope="col">roles</th>
<th scope="col"> <th scope="col"></th>
<p class="text-right">
<a class="btn btn-primary" href="{{ url_for("user.show") }}">
<i class="fa fa-plus" aria-hidden="true"></i> New
</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#csvimport">
<i class="fa fa-file-csv" aria-hidden="true"></i> CSV import
</button>
</p>
</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.
Finish editing this message first!
Please register or to comment