|
1 | 1 | {% extends 'base.html' %} |
2 | | -{% block title %}User List{% endblock %} |
3 | | -{% block page_heading %}<i class="material-icons">people</i> User List{% endblock %} |
| 2 | +{% block title %}Trackit | Team{% endblock %} |
| 3 | +{% block page_heading %}<i class="material-icons">people</i> Users ({{ users.count }}) |
| 4 | +<hr> |
| 5 | +{% endblock %} |
4 | 6 | {% block head %} |
5 | | -<!-- <link rel="stylesheet" href="//cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"> --> |
6 | 7 | <link rel="stylesheet" type="text/css" |
7 | 8 | href="https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.20/b-1.6.1/b-html5-1.6.1/cr-1.5.2/r-2.2.3/sp-1.0.1/sl-1.3.1/datatables.min.css" /> |
8 | 9 | {% endblock %} |
| 10 | +{% block container-class %}user-list-container{% endblock %} |
9 | 11 | {% block content %} |
10 | | -<div class="row"> |
11 | | - <div class="col col-12"> |
12 | | - <table id="user-table" class="table display"> |
13 | | - <thead> |
14 | | - <tr> |
15 | | - <th>ID</th> |
16 | | - <th>User</th> |
17 | | - <th>First Name</th> |
18 | | - <th>Last Name</th> |
19 | | - <th>Role</th> |
20 | | - <th>SuperUser</th> |
21 | | - <th>Email</th> |
22 | | - </tr> |
23 | | - </thead> |
24 | | - <tbody> |
25 | | - {% for user in users %} |
26 | | - <tr> |
27 | | - <td>{{ user.id }}</td> |
28 | | - <td>{{ user.username }}</td> |
29 | | - <td>{{ user.first_name }}</td> |
30 | | - <td>{{ user.last_name }}</td> |
31 | | - <td>placeholder</td> |
32 | | - <td>{{ user.is_superuser }}</td> |
33 | | - <td>{{ user.email }}</td> |
34 | | - </tr> |
35 | | - {% endfor %} |
36 | | - </tbody> |
37 | | - </table> |
| 12 | +<!-- Internal Panes Nav Items --> |
| 13 | +<nav> |
| 14 | + <div class="nav nav-tabs" id="nav-tab" role="tablist"> |
| 15 | + <a class="nav-item nav-link active" id="nav-submitters-tab" data-toggle="tab" href="#nav-submitters" role="tab" |
| 16 | + aria-controls="nav-submitters" aria-selected="true">Submitters ({{ submitters.count }})</a> |
| 17 | + <a class="nav-item nav-link" id="nav-assignees-tab" data-toggle="tab" href="#nav-assignees" role="tab" |
| 18 | + aria-controls="nav-assignees" aria-selected="false">Assignees ({{ staff.count }})</a> |
| 19 | + </div> |
| 20 | +</nav> |
| 21 | + |
| 22 | +<!-- Internal Panes --> |
| 23 | +<div class="tab-content" id="nav-tabContent"> |
| 24 | + <!-- Submitters Pane Here --> |
| 25 | + <div class="tab-pane fade show active" id="nav-submitters" role="tabpanel" aria-labelledby="nav-submitters-tab"> |
| 26 | + <br> |
| 27 | + <div class="row"> |
| 28 | + <div class="col col-12"> |
| 29 | + <table id="submitters-table" class="table display"> |
| 30 | + <thead> |
| 31 | + <tr> |
| 32 | + <th>ID</th> |
| 33 | + <th>User</th> |
| 34 | + <th>First Name</th> |
| 35 | + <th>Last Name</th> |
| 36 | + <th>Email</th> |
| 37 | + </tr> |
| 38 | + </thead> |
| 39 | + <tbody> |
| 40 | + {% for submitter in submitters %} |
| 41 | + <tr> |
| 42 | + <td>{{ submitter.id }}</td> |
| 43 | + <td>{{ submitter.username }}</td> |
| 44 | + <td>{{ submitter.first_name }}</td> |
| 45 | + <td>{{ submitter.last_name }}</td> |
| 46 | + <td><a href="mailto:{{ submitter.email }}" data-toggle="tooltip" title="Mail to:" |
| 47 | + data-placement="left"> |
| 48 | + {{ submitter.email }}</td> |
| 49 | + </tr> |
| 50 | + {% endfor %} |
| 51 | + </tbody> |
| 52 | + </table> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + <!-- Assignees Pane --> |
| 57 | + <div class="tab-pane fade" id="nav-assignees" role="tabpanel" aria-labelledby="nav-assignees-tab"> |
| 58 | + <!-- Table --> |
| 59 | + <br> |
| 60 | + <div class="row"> |
| 61 | + <div class="col col-12"> |
| 62 | + <table id="assignees-table" class="table display"> |
| 63 | + <thead> |
| 64 | + <tr> |
| 65 | + <th>ID</th> |
| 66 | + <th>User</th> |
| 67 | + <th>First Name</th> |
| 68 | + <th>Last Name</th> |
| 69 | + <th>Email</th> |
| 70 | + </tr> |
| 71 | + </thead> |
| 72 | + <tbody> |
| 73 | + {% for staff_member in staff %} |
| 74 | + <tr> |
| 75 | + <td>{{ staff_member.id }}</td> |
| 76 | + <td>{{ staff_member.username }}</td> |
| 77 | + <td>{{ staff_member.first_name }}</td> |
| 78 | + <td>{{ staff_member.last_name }}</td> |
| 79 | + <td><a href="mailto:{{ staff_member.email }}" data-toggle="tooltip" title="Mail to:" |
| 80 | + data-placement="left"> |
| 81 | + {{ staff_member.email }}</td> |
| 82 | + </tr> |
| 83 | + {% endfor %} |
| 84 | + </tbody> |
| 85 | + </table> |
| 86 | + </div> |
| 87 | + </div> |
38 | 88 | </div> |
39 | 89 | </div> |
40 | 90 | {% endblock %} |
41 | 91 | {% block scripts %} |
42 | | -<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script> |
| 92 | +<!-- DataTables.js --> |
43 | 93 | <script type="text/javascript" |
44 | 94 | src="https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.20/b-1.6.1/b-html5-1.6.1/cr-1.5.2/r-2.2.3/sp-1.0.1/sl-1.3.1/datatables.min.js"></script> |
45 | | -<script> |
46 | | - $(document).ready(() => { |
47 | | - $('#user-table').DataTable(); |
48 | | - }); |
49 | | -</script> |
50 | 95 | {% endblock %} |
0 commit comments