docs: Document video resolution config.
[mediagoblin.git] / mediagoblin / templates / mediagoblin / moderation / 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 {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
20 {%- block mediagoblin_head %}
21 <script src="{{ request.staticdirect('/js/setup_report_forms.js') }}">
22 </script>
23 {% endblock %}
24
25 {%- block mediagoblin_content %}
26 {% if not report %}
27 {% trans %}Sorry, no such report found.{% endtrans %}
28 {% else %}
29 <div class="row">
30 <a href="{{ request.urlgen('mediagoblin.moderation.reports') }}"
31 class="return_to_panel button_action"
32 title="Return to Reports Panel">
33 {% trans %}Return to Reports Panel{% endtrans %}</a>
34 </div>
35 <h2>{% trans %}Report{% endtrans %} #{{ report.id }}</h2>
36 {% if report.is_comment_report() and report.object_id %}
37
38 {% trans %}Reported comment{% endtrans %}:
39 {% set comment = report.obj() %}
40 {% set target = report.obj().get_reply_to() %}
41 {% set reported_user = comment.get_actor %}
42 <div id="comment-{{ comment.id }}"
43 class="comment_wrapper">
44 <div class="comment_author">
45 <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
46 <a href="{{ request.urlgen('mediagoblin.moderation.users_detail',
47 user=comment.get_actor.username) }}"
48 class="comment_authorlink">
49 {{- reported_user.username -}}
50 </a>
51 <a href="{{ request.urlgen(
52 'mediagoblin.user_pages.media_home.view_comment',
53 comment=comment.id,
54 user=target.get_actor.username,
55 media=target.slug_or_id) }}#comment"
56 class="comment_whenlink">
57 <span title='{{- comment.created.strftime(app_config['datetime_format']) -}}'>
58 {%- trans formatted_time=timesince(comment.created) -%}
59 {{ formatted_time }} ago
60 {%- endtrans -%}
61 </span></a>:
62 </div>
63 <div class=comment_content>
64 {% autoescape False %}
65 {{ comment.content_html }}
66 {% endautoescape %}
67 </div>
68 </div>
69 {% elif report.is_media_entry_report() and report.object_id %}
70
71 {% set media_entry = report.obj() %}
72 <div class="three columns media_thumbnail">
73 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home',
74 user=media_entry.get_actor.username,
75 media=media_entry.slug_or_id) }}">
76 <img src="{{ media_entry.thumb_url}}"/></a>
77 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home',
78 user=media_entry.get_actor.username,
79 media=media_entry.slug_or_id) }}" class=thumb_entry_title>
80 {{ media_entry.title }}</a>
81 </div>
82 <div class=clear></div>
83 <p>
84 {% trans user_name=report.reported_user.username,
85 user_url=request.urlgen(
86 'mediagoblin.moderation.users_detail',
87 user=report.reported_user.username) %}
88 ❖ Reported media by <a href="{{ user_url }}">{{ user_name }}</a>
89 {% endtrans %}
90 </p>
91 <div class=clear></div>
92 {% else %}
93 <h2>{% trans user_url=request.urlgen(
94 'mediagoblin.moderation.users_detail',
95 user=report.reported_user.username),
96 user_name=report.reported_user.username %}
97 CONTENT BY
98 <a href="{{ user_url }}"> {{ user_name }}</a>
99 HAS BEEN DELETED
100 {% endtrans %}
101 </h2>
102 {% endif %}
103 {% trans %}Reason for report:{% endtrans %}
104 <div id="report-{{ report.id }}"
105 class="report_wrapper">
106 <div class="report_author">
107 <img src="{{ request.staticdirect(
108 '/images/icon_clipboard_alert.png') }}"
109 alt=""
110 title="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
111 Distributed by the GNOME project http://www.gnome.org" />
112 <a href="{{ request.urlgen('mediagoblin.moderation.users_detail',
113 user=report.reporter.username) }}"
114 class="report_authorlink">
115 {{- report.reporter.username -}}
116 </a>
117 <a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
118 report_id=report.id) }}"
119 class="report_whenlink">
120 <span title='{{- report.created.strftime(app_config['datetime_format']) -}}'>
121 {%- trans formatted_time=timesince(report.created) -%}
122 {{ formatted_time }} ago
123 {%- endtrans -%}
124 </span>
125 </a>
126 </div>
127 <div class="report_content">
128 {{ report.report_content }}
129 </div>
130 </div>
131 {% if not report.is_archived_report() and
132 not (report.reported_user.has_privilege('admin') and
133 not request.user.has_privilege('admin')) %}
134 <input type=button class="button_action" value="{% trans %}Resolve{% endtrans %}" id=open_resolution_form />
135 <form action="" method="POST" id=resolution_form>
136 {{ wtforms_util.render_divs(form) }}
137 {{ csrf_token }}
138 <input type=submit class="button_action_highlight" id="submit_this_report" value="{% trans %}Resolve This Report{% endtrans %}"/>
139 </form>
140 <script>
141 $(document).ready(function() {
142 init_report_resolution_form();
143 });
144 </script>
145 {% elif report.is_archived_report() %}
146 <h2><img src="{{ request.staticdirect('/images/icon_clipboard.png') }}"
147 alt=""
148 title="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
149 Distributed by the GNOME project http://www.gnome.org" />
150 {% trans %}Status{% endtrans %}:
151 </h2>
152 <b>{% trans %}RESOLVED{% endtrans %}</b>
153 {{ report.resolved.strftime(app_config['datetime_format']) }}
154 <pre>
155 <p>{{ report.result }}</p>
156 </pre>
157 {% else %}
158 <input type=button disabled=disabled value="{% trans %}Resolve This Report{% endtrans %}"/>
159 <p>
160 {% trans -%}
161 You cannot take action against an administrator
162 {%- endtrans %}
163 </p>
164 {% endif %}
165 {% endif %}
166 {% endblock %}