diff --git a/generic/templates/generic/exam_users_edit.html b/generic/templates/generic/exam_users_edit.html index d5b0b264..38154591 100644 --- a/generic/templates/generic/exam_users_edit.html +++ b/generic/templates/generic/exam_users_edit.html @@ -1,103 +1,84 @@ {% include "generic/exam_candidate_headers.html" %} -

Users

-{% if groups %} - Users from the following groups are available: {% for group in groups %}{{group}}, {% endfor %} . -{% else %} - This exam is not associated with any user groups. Edit and add a group to enable user management. -{% endif %} -
    - {% for user in current_user_users %} +
    +
    +
    +
    +
    Users
    + {% if groups %} +
    Users from the following groups are available: + {% for group in groups %} + {{group}} + {% endfor %} +
    + {% else %} +
    This exam is not associated with any user groups. Edit and add a group to enable user management.
    + {% endif %} +
    +
    + {% if current_user_users or available_user_users %} + + {% endif %} + + +
    +
    -
  1. {{user.username}} / - Email: {{user.email}} - {% if user.userprofile.grade %} - [{{user.userprofile.grade}}] - {% endif %} - {% if request.user.is_superuser %} - - {% endif %} - -
  2. - - {% endfor %} - {% for user in available_user_users %} - -
  3. {{user.username}} / - Email: {{user.email}} - {% if user.userprofile.grade %} - [{{user.userprofile.grade}}] - {% endif %} - {% if request.user.is_superuser %} - - {% endif %} - -
  4. - - {% endfor %} -
- -{% comment %} Hide the toggle button if there are no users (to add or remove) {% endcomment %} -

-{% if current_user_users or available_user_users %} - -{% endif %} - - - -

+ {% include 'generic/partials/user_user_list.html' with exam=exam current_user_users=current_user_users available_user_users=available_user_users %} + +