70 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% from "common/macros.html" import timestamp, accordion %}
 | 
						|
{% extends "base.html" %}
 | 
						|
{% block content %}
 | 
						|
<div class="darkbg inbox-container">
 | 
						|
  {% set guests = (users | selectattr('permission', 'eq', PermissionLevel.GUEST.value) | list) %}
 | 
						|
  {% set not_guests = (users | selectattr('permission', 'gt', PermissionLevel.GUEST.value) | list) %}
 | 
						|
  {% call(section) accordion(disabled=(guests | count==0)) %}
 | 
						|
    {% if section == "header" %}
 | 
						|
      <span>Unconfirmed guests</span>
 | 
						|
    {% elif section == "content" %}
 | 
						|
      <table class="colorful-table">
 | 
						|
        <thead>
 | 
						|
          <th>Username</th>
 | 
						|
          <th class="small">Signed up on</th>
 | 
						|
        </thead>
 | 
						|
        {% for user in guests %}
 | 
						|
          <tr>
 | 
						|
            <td>
 | 
						|
              <a href="{{url_for("users.page", username=user['username'])}}">{{user['username']}}
 | 
						|
              </a>
 | 
						|
            </td>
 | 
						|
            <td>
 | 
						|
              {{ timestamp(user.created_at) }}
 | 
						|
            </td>
 | 
						|
          </tr>
 | 
						|
        {% endfor %}
 | 
						|
      </table>
 | 
						|
    {% endif %}
 | 
						|
  {% endcall %}
 | 
						|
 | 
						|
  {% call(section) accordion() %}
 | 
						|
    {% if section == "header" %}
 | 
						|
      <span>Other users</span>
 | 
						|
    {% elif section == "content" %}
 | 
						|
      <table class="colorful-table">
 | 
						|
        <thead>
 | 
						|
          <th>Username</th>
 | 
						|
          <th class="small">Permission</th>
 | 
						|
          <th class="small">Signed up on</th>
 | 
						|
          {% if active_user.is_admin() %}
 | 
						|
            <th class="small">Create password reset link</th>
 | 
						|
          {% endif %}
 | 
						|
        </thead>
 | 
						|
        {% for user in not_guests %}
 | 
						|
          <tr>
 | 
						|
            <td>
 | 
						|
              <a href="{{url_for("users.page", username=user['username'])}}">{{user['username']}}
 | 
						|
              </a>
 | 
						|
            </td>
 | 
						|
            <td>
 | 
						|
              {{ user.permission | permission_string }}
 | 
						|
            </td>
 | 
						|
            <td>
 | 
						|
              {{ timestamp(user.created_at) }}
 | 
						|
            </td>
 | 
						|
            {% if active_user.is_admin() %}
 | 
						|
              <td>
 | 
						|
                <form method="post" action="{{url_for('mod.create_reset_pass', user_id=user.id)}}">
 | 
						|
                  <input type="submit" class="warn" value="Create password reset link">
 | 
						|
                </form>
 | 
						|
              </td>
 | 
						|
            {% endif %}
 | 
						|
          </tr>
 | 
						|
        {% endfor %}
 | 
						|
      </table>
 | 
						|
    {% endif %}
 | 
						|
  {% endcall %}
 | 
						|
</div>
 | 
						|
{% endblock %}
 |