Commit | Line | Data |
---|---|---|
3ce0c611 | 1 | {# |
2 | # GNU MediaGoblin -- federated, autonomous media hosting | |
3 | # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. | |
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License as published by | |
7 | # the Free Software Foundation, either version 3 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU Affero General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU Affero General Public License | |
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | #} | |
18 | {% extends "mediagoblin/base.html" %} | |
19 | ||
20 | {% block title -%} | |
21 | {% trans %}User panel{% endtrans %} — {{ super() }} | |
22 | {%- endblock %} | |
23 | ||
24 | {% block mediagoblin_content %} | |
25 | ||
26 | <h1>{% trans %}User panel{% endtrans %}</h1> | |
27 | ||
28 | <p> | |
3aa3871b | 29 | {% trans %} |
30 | Here you can look up users in order to take punitive actions on them. | |
31 | {% endtrans %} | |
3ce0c611 | 32 | </p> |
dfd66b78 | 33 | |
3ce0c611 | 34 | <h2>{% trans %}Active Users{% endtrans %}</h2> |
35 | ||
36 | {% if user_list.count() %} | |
6483b370 | 37 | {% if not last_page == 1 %} |
f9112bd8 BS |
38 | {% if 'p='~current_page in request.query_string %} |
39 | {% set query_string = request.query_string %}{% else %} | |
6483b370 | 40 | {% set query_string = |
f9112bd8 | 41 | 'p='~current_page~"&"+request.query_string %} |
6483b370 | 42 | {% endif %} |
43 | <div class="right_align"> | |
44 | {% set first_vis = current_page-3 %} | |
45 | {% set last_vis = current_page+3 %} | |
46 | {% if 1 == current_page %}<b>1</b>{% else %} | |
47 | <a href ="?{{ query_string.replace( | |
48 | 'p='~current_page, | |
49 | 'p='~1) }}"> | |
50 | 1</a>{% endif %} | |
51 | {% if first_vis > 1 %}...{% endif %} | |
52 | {% for p in range(first_vis,last_vis+1) %} | |
53 | {% if p > 1 and p < last_page and | |
54 | current_page !=p %} | |
55 | <a href="?{{ query_string.replace( | |
56 | 'p='~current_page, | |
57 | 'p='~p) }}"> | |
58 | {{ p }}</a> | |
59 | {% elif p > 1 and p < last_page %} | |
60 | <b>{{ p }}</b> | |
61 | {% endif %} | |
62 | {% endfor %} | |
63 | {% if last_vis < last_page %}...{% endif %} | |
64 | {% if last_page != current_page %} | |
65 | <a href ="?{{ query_string.replace( | |
66 | 'p='~current_page, | |
67 | 'p='~last_page) }}"> | |
68 | {{ last_page }}</a> | |
69 | {% else %}<b>{{ last_page }}</b> | |
70 | {% endif %} | |
71 | </div> | |
72 | {% endif %} | |
3ce0c611 | 73 | <table class="admin_panel processing"> |
74 | <tr> | |
75 | <th>{% trans %}ID{% endtrans %}</th> | |
76 | <th>{% trans %}Username{% endtrans %}</th> | |
77 | <th>{% trans %}When Joined{% endtrans %}</th> | |
78 | <th>{% trans %}# of Comments Posted{% endtrans %}</th> | |
79 | </tr> | |
80 | {% for user in user_list %} | |
81 | <tr> | |
82 | <td>{{ user.id }}</td> | |
3aa3871b | 83 | <td> |
84 | <a href="{{ request.urlgen('mediagoblin.moderation.users_detail', | |
85 | user= user.username) }}"> | |
86 | {{ user.username }} | |
87 | </a> | |
88 | </td> | |
3ce0c611 | 89 | <td>{{ user.created.strftime("%F %R") }}</td> |
90 | <td>{{ user.posted_comments.count() }}</td> | |
91 | </tr> | |
92 | {% endfor %} | |
93 | </table> | |
94 | {% else %} | |
95 | <p><em>{% trans %}No users found.{% endtrans %}</em></p> | |
dfd66b78 | 96 | {% endif %} |
3ce0c611 | 97 | {% endblock %} |