Self hosted FLOSS fitness/workout, nutrition and weight tracker
Split gym member list into admins and regular users
Roland Geideref857a624f51
diff --git a/wger/core/templates/gym/member_list.html b/wger/core/templates/gym/member_list.htmlindex 46df47cf8..af7dca938 100644--- a/wger/core/templates/gym/member_list.html+++ b/wger/core/templates/gym/member_list.html@@ -17,17 +17,47 @@</thead><tbody>{% for current_user in object_list %}+{% if not current_user.perms.any_admin %}<tr><td>{{current_user.obj.pk}}</td><td>- {% if current_user.perms.any_admin %}- {{current_user.obj}}- {% else %}- <a href="{% url 'core:user-overview' current_user.obj.pk %}">{{current_user.obj}}</a>- {% endif %}+ <a href="{% url 'core:user-overview' current_user.obj.pk %}">{{current_user.obj}}</a>+ </td>+ <td>+ {{current_user.obj.get_full_name}}+ </td>+</tr>+{% endif %}+{% empty %}+<tr>+ <td colspan="2">{% trans "No users for this gym found" %}</td>+</tr>+{% endfor %}+</tbody>+</table>+++<h4>{% trans "Administrators and trainers" %}</h4>+<table class="table">+<thead>+<tr>+ <th>{% trans "ID" %}</th>+ <th>{% trans "Username" %}</th>+ <th>{% trans "Name" %}</th>+</tr>+</thead>+<tbody>+{% for current_user in object_list %}+{% if current_user.perms.any_admin %}+<tr>+ <td>+ {{current_user.obj.pk}}+ </td>+ <td>+ {{current_user.obj}}{% if current_user.perms.gym_trainer %}<span class="label label-primary">{% trans "Trainer" %}</span>@@ -45,6 +75,7 @@{{current_user.obj.get_full_name}}</td></tr>+{% endif %}{% empty %}<tr><td colspan="2">{% trans "No users for this gym found" %}</td>