ff5cb427cd68ba7f4290cf68aa0902ec9f8d5576
[mediagoblin.git] / mediagoblin / templates / mediagoblin / admin / report.html
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 %}Report panel{% endtrans %} &mdash; {{ super() }}
22 {%- endblock %}
23
24 {% block mediagoblin_content %}
25
26 <h1>{% trans %}Report panel{% endtrans %}</h1>
27
28 <p>
29 {% trans %}Here you can look up users in order to take punitive actions on them.{% endtrans %}
30 </p>
31
32 <h2>{% trans %}Reports Filed on Comments{% endtrans %}</h2>
33
34 {% if report_list.count() %}
35 <table class="media_panel processing">
36 <tr>
37 <th>ID</th>
38 <th>Report Type</th>
39 <th>Offender</th>
40 <th>When Reported</th>
41 <th>Reported By</th>
42 <th>Reason</th>
43 <th>Reported Comment or Media Entry</th>
44 </tr>
45 {% for report in report_list %}
46 <tr>
47 {% if report.discriminator == "comment_report" %}
48 <td>{{ report.id }}</td>
49 <td>Comment Report</td>
50 <td>{{ report.comment.get_author.username }}</td>
51 <td>{{ report.created.strftime("%F %R") }}</td>
52 <td>{{ report.reporter.username }}</td>
53 <td>{{ report.report_content }}</td>
54 <td><a href="{{ report.comment.get_media_entry.url_for_self(request.urlgen) }}">{{ report.comment.get_media_entry.title }}</a></td>
55 {% elif report.discriminator == "media_report" %}
56 <td>{{ report.id }}</td>
57 <td>Media Report</td>
58 <td>{{ report.media_entry.get_uploader.username }}</td>
59 <td>{{ report.created.strftime("%F %R") }}</td>
60 <td>{{ report.reporter.username }}</td>
61 <td>{{ report.report_content[0:20] }}...</td>
62 <td><a href="{{ report.media_entry.url_for_self(request.urlgen) }}">{{ report.media_entry.title }}</a></td>
63 {% endif %}
64 </tr>
65 {% endfor %}
66 </table>
67 {% else %}
68 <p><em>{% trans %}No open reports found.{% endtrans %}</em></p>
69 {% endif %}
70 <h2>{% trans %}Closed Reports on Comments{% endtrans %}</h2>
71 {% if closed_report_list.count() %}
72 <table class="media_panel processing">
73 <tr>
74 <th>ID</th>
75 <th>Offender</th>
76 <th>When Reported</th>
77 <th>Reported By</th>
78 <th>Reason</th>
79 <th>Comment Posted On</th>
80 </tr>
81 {% for report in closed_report_list %}
82 <tr>
83 <td>{{ report.id }}</td>
84 <td>{{ report.comment.get_author.username }}</td>
85 <td>{{ report.created.strftime("%F %R") }}</td>
86 <td>{{ report.reporter.username }}</td>
87 <td>{{ report.report_content }}</td>
88 <td><a href="{{ report.comment.get_media_entry.url_for_self(request.urlgen) }}">{{ report.comment.get_media_entry.title }}</a></td>
89 </tr>
90 {% endfor %}
91 </table>
92 {% else %}
93 <p><em>{% trans %}No closed reports found.{% endtrans %}</em></p>
94 {% endif %}
95 {% endblock %}