Whew. This is a big update. I did some significant keeping work. I moved all of
[mediagoblin:mediagoblin.git] / mediagoblin / templates / mediagoblin / moderation / report_panel.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{% endtrans %}</h2>
33
34 {% if report_list.count() %}
35   <table class="admin_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
48             <td><a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
49                                     report_id=report.id) }}">{{ report.id }}</a></td>
50         {% if report.discriminator == "comment_report" %}
51             <td>Comment Report</td>
52             <td>{{ report.comment.get_author.username }}</td>
53             <td>{{ report.created.strftime("%F %R") }}</td>
54             <td>{{ report.reporter.username }}</td>
55             <td>{{ report.report_content }}</td>
56             <td><a href="{{ report.comment.get_media_entry.url_for_self(request.urlgen) }}">{{ report.comment.get_media_entry.title }}</a></td>
57         {% elif report.discriminator == "media_report" %}
58             <td>Media Report</td>
59             <td>{{ report.media_entry.get_uploader.username }}</td>
60             <td>{{ report.created.strftime("%F %R") }}</td>
61             <td>{{ report.reporter.username }}</td>
62             <td>{{ report.report_content[0:20] }}...</td>
63             <td><a href="{{ report.media_entry.url_for_self(request.urlgen) }}">{{ report.media_entry.title }}</a></td>
64         {% endif %}
65       </tr>
66     {% endfor %}
67   </table>
68 {% else %}
69   <p><em>{% trans %}No open reports found.{% endtrans %}</em></p>
70 {% endif %}
71 <h2>{% trans %}Closed Reports{% endtrans %}</h2>
72 {% if closed_report_list.count() %}
73   <table class="media_panel processing">
74     <tr>
75       <th>ID</th>
76       <th>Resolved</th>
77       <th>Offender</th>
78       <th>Action Taken</th>
79       <th>Reported By</th>
80       <th>Reason</th>
81       <th>Reported Comment or Media Entry</th>
82     </tr>
83     {% for report in closed_report_list %}
84             <td><a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
85                                     report_id=report.id) }}">{{ report.id }}</a></td>
86         {% if report.discriminator == "comment_report" %}
87             <td>{{ report.resolved.strftime("%F %R") }}</td>
88             <td>{{ report.comment.get_author.username }}</td>
89             <td>{{ report.created.strftime("%F %R") }}</td>
90             <td>{{ report.reporter.username }}</td>
91             <td>{{ report.report_content }}</td>
92             <td><a href="{{ report.comment.get_media_entry.url_for_self(request.urlgen) }}">{{ report.comment.get_media_entry.title }}</a></td>
93         {% elif report.discriminator == "media_report" %}
94             <td>{{ report.resolved.strftime("%F %R") }}</td>
95             <td>{{ report.media_entry.get_uploader.username }}</td>
96             <td>{{ report.created.strftime("%F %R") }}</td>
97             <td>{{ report.reporter.username }}</td>
98             <td>{{ report.report_content[0:20] }}...</td>
99             <td><a href="{{ report.media_entry.url_for_self(request.urlgen) }}">{{ report.media_entry.title }}</a></td>
100         {% endif %}
101     {% endfor %}
102   </table>
103 {% else %}
104   <p><em>{% trans %}No closed reports found.{% endtrans %}</em></p>
105 {% endif %} 
106 {% endblock %}