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