2 # GNU MediaGoblin -- federated, autonomous media hosting
3 # Copyright (C)
2011,
2012 MediaGoblin contributors. See AUTHORS.
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.
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.
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
/>.
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') }}">
25 {%- block mediagoblin_content %}
27 {% trans %}Sorry, no such report found.{% endtrans %}
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>
35 <h2>{% trans %}Report{% endtrans %} #{{ report.id }}
</h2>
36 {% if report.is_comment_report() and report.object_id %}
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 -}}
51 <a href=
"{{ request.urlgen(
52 'mediagoblin.user_pages.media_home.view_comment',
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
63 <div class=comment_content
>
64 {% autoescape False %}
65 {{ comment.content_html }}
69 {% elif report.is_media_entry_report() and report.object_id %}
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>
82 <div class=clear
></div>
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>
91 <div class=clear
></div>
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 %}
98 <a href=
"{{ user_url }}"> {{ user_name }}
</a>
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') }}"
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 -}}
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
127 <div class=
"report_content">
128 {{ report.report_content }}
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) }}
138 <input type=submit
class=
"button_action_highlight" id=
"submit_this_report" value=
"{% trans %}Resolve This Report{% endtrans %}"/>
141 $(document).ready(function() {
142 init_report_resolution_form();
145 {% elif report.is_archived_report() %}
146 <h2><img src=
"{{ request.staticdirect('/images/icon_clipboard.png') }}"
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 %}:
152 <b>{% trans %}RESOLVED{% endtrans %}
</b>
153 {{ report.resolved.strftime(app_config['datetime_format']) }}
155 <p>{{ report.result }}
</p>
158 <input type=button disabled=disabled
value=
"{% trans %}Resolve This Report{% endtrans %}"/>
161 You cannot take action against an administrator