File size: 1,051 Bytes
e9ee222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% extends "base.html" %} {% block content %}
<div class="container py-4">
  <h1 class="h2 mb-4">Manage Users</h1>
  <p class="text-muted">
    Admin users cannot view individual user reports to maintain privacy.
  </p>

  <div class="card shadow-sm">
    <div class="card-body p-0">
      <table class="table table-hover mb-0 users-table">
        <thead>
          <tr>
            <th>ID</th>
            <th>Username</th>
            <th>Email</th>
            <th>Admin Status</th>
          </tr>
        </thead>
        <tbody>
          {% for user in users %}
          <tr>
            <td>{{ user.id }}</td>
            <td>{{ user.username }}</td>
            <td>{{ user.email }}</td>
            <td>
              {% if user.is_admin %}
              <span class="badge bg-danger">Admin</span>
              {% else %}
              <span class="badge bg-secondary">User</span>
              {% endif %}
            </td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </div>
</div>
{% endblock %}