]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/osqaadmin/moderation.html
Migrate to Django 1.6
[osqa.git] / forum / skins / default / templates / osqaadmin / moderation.html
1 {% extends basetemplate %}
2
3 {% load i18n humanize %}
4
5 {% block subtitle %}{% trans "Moderation" %}{% endblock %}
6 {% block pagename %}{% trans "Moderation" %}{% endblock %}
7 {% block description %}{% trans "These tools allow you to search for undesired behaviours and cheating patterns." %}{% endblock %}
8
9 {% block admincontent %}
10     <div class="module">
11         <form action="" id="changelist" method="POST">
12             {% csrf_token %}
13             <div class="actions">
14                 {% trans "Verify:" %}
15                 <input type="text" size="3" name="limit" id="filter-limit" value="5" />
16                 <select name="sort" id="filter-sort">
17                     <option value="high-rep">{% trans "highest ranking users" %}</option>
18                     <option value="newer">{% trans "newer users" %}</option>
19                     <option value="older">{% trans "older users" %}</option>
20                     <option value="ids">{% trans "users with these ids" %}</option>
21                 </select>
22                 <span id="filter-ids" style="display: none">
23                     <input type="text" name="ids" size="15" />
24                     <small>{% trans "(Comma separated list of user ids)" %}</small>
25                 </span>
26                 <input type="submit" value="{% trans "Go" %}" />
27             </div>
28         </form>
29         <script type="text/javascript">
30             $(function() {
31                 $limit = $('#filter-limit');
32                 $sort = $('#filter-sort');
33                 $ids = $('#filter-ids');
34
35                 function verify_sort() {
36                     if ($sort.val() == "ids") {
37                         $ids.show();
38                         $limit.hide();
39                     } else {
40                         $ids.hide();
41                         $limit.show();
42                     }
43                 }
44
45                 verify_sort();
46                 $sort.change(verify_sort);
47             })
48         </script>
49         {% if cheaters %}
50         <table cellspacing="0" width="100%">
51             <caption>{% trans "Possible cheaters" %}</caption>
52             {% for cheater, fakes in cheaters %}
53             <tr>
54                 <td>
55                     <div class="cheater-info">
56                         <p><a href="{{ cheater.get_profile_url }}">{{ cheater.username }}</a></p>
57                         <p><b>{% trans "Email" %}</b>
58                         {% if cheater.email_isvalid %}
59                             <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-yes.gif" alt="{% trans "Validated" %}" />
60                         {% else %}
61                             <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-no.gif" alt="{% trans "Not validated" %}" />
62                         {% endif %}
63                         <a href="mailto: {{ cheater.email }}">{{ cheater.email }}</a></p>
64                         <p><b>{% trans "Reputation:" %}</b> {{ cheater.reputation|intcomma }}</p>
65                     </div>
66                     <table cellspacing="0" width="100%">
67                         <thead>
68                             <tr>
69                                 <th>{% trans "Profile" %}</th>
70                                 <th>{% trans "Email" %}</th>
71                                 <th>{% trans "Reputation" %}</th>
72                                 <th>{% trans "Affecting actions" %}</th>
73                                 <th>{% trans "Cross ips" %}</th>
74                                 <th>{% trans "Cheating score" %}</th>
75                             </tr>
76                         </thead>
77                         <caption>{% trans "Possible fake accounts" %}</caption>
78                         {% for fake in fakes %}
79                             <tr>
80                                 <td><a href="{{ fake.get_profile_url }}">{{ fake.username }}</a></td>
81                                 <td>
82                                     {% if fake.email_isvalid %}
83                                         <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-yes.gif" alt="{% trans "Validated" %}" />
84                                     {% else %}
85                                         <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-no.gif" alt="{% trans "Not validated" %}" />
86                                     {% endif %}
87                                     <a href="mailto: {{ fake.email }}">{{ fake.email }}</a>
88                                 </td>
89                                 <td>{{ fake.reputation|intcomma }}</td>
90                                 <td>{{ fake.fdata.affect_count }} {% trans "out of" %} {{ fake.fdata.total_actions }} ({{ fake.fdata.action_ratio|stringformat:".2f" }}%)</td>
91                                 <td>{{ fake.fdata.cross_ip_count }} {% trans "out of" %} {{ fake.fdata.total_ip_count }} ({{ fake.fdata.cross_ip_ratio|stringformat:".2f" }}%)</td>
92                                 <td>{{ fake.fdata.fake_score|stringformat:".2f" }}</td>
93                             </tr>
94                         {% endfor %}
95                     </table>
96                 </td>
97             </tr>
98             {% endfor %}
99         </table>
100         {% endif %}
101     </div>
102 {% endblock %}