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') }}"></script>
24 {%- block mediagoblin_content %}
26 Sorry, no such report found.
28 <a href=
"{{ request.urlgen('mediagoblin.moderation.reports') }}"
29 class=
"return_to_panel button_action"
30 title=
"Return to Reports Panel">
31 {% trans %}Return to Reports Panel{% endtrans %}
</a>
32 <h2>{% trans %}Report{% endtrans %} #{{ report.id }}
</h2>
33 {% if report.is_comment_report() or
34 (report.is_archived_report() and report.comment) %}
36 {% trans %}Reported comment{% endtrans %}:
37 {% set comment = report.comment %}
38 {% set reported_user = comment.get_author %}
39 <div id=
"comment-{{ comment.id }}"
40 class=
"comment_wrapper">
41 <div class=
"comment_author">
42 <img src=
"{{ request.staticdirect('/images/icon_comment.png') }}" />
43 <a href=
"{{ request.urlgen('mediagoblin.moderation.users_detail',
44 user=comment.get_author.username) }}"
45 class=
"comment_authorlink">
46 {{- reported_user.username -}}
48 <a href=
"{{ request.urlgen(
49 'mediagoblin.user_pages.media_home.view_comment',
51 user=comment.get_media_entry.get_uploader.username,
52 media=comment.get_media_entry.slug_or_id) }}#comment"
53 class=
"comment_whenlink">
54 <span title='{{- comment.created.strftime(
"%I:%M%p %Y-%m-%d") -}}'
>
55 {%- trans formatted_time=timesince(comment.created) -%}
56 {{ formatted_time }} ago
60 <div class=comment_content
>
61 {% autoescape False %}
62 {{ comment.content_html }}
66 {% elif report.is_media_entry_report() or
67 (report.is_archived_report() and report.media_entry) %}
69 {% set media_entry = report.media_entry %}
70 <div class=
"media_thumbnail">
71 <a href=
"{{ request.urlgen('mediagoblin.user_pages.media_home',
72 user=media_entry.get_uploader.username,
73 media=media_entry.slug_or_id) }}">
74 <img src=
"{{ media_entry.thumb_url}}"/></a>
75 <a href=
"{{ request.urlgen('mediagoblin.user_pages.media_home',
76 user=media_entry.get_uploader.username,
77 media=media_entry.slug_or_id) }}" class=thumb_entry_title
>
78 {{ media_entry.title }}
</a>
80 <div class=clear
></div>
82 {% trans user_name=report.reported_user.username,
83 user_url=request.urlgen(
84 'mediagoblin.moderation.users_detail',
85 user=report.reported_user.username) %}
86 ❖ Reported media by
<a href=
"{{ user_url }}">{{ user_name }}
</a>
89 <div class=clear
></div>
91 <h2>{% trans user_url=request.urlgen(
92 'mediagoblin.moderation.users_detail',
93 user=report.reporter.username),
94 user_name=report.reported_user.username %}
96 <a href=
"{{ user_url }}"> {{ user_name }}
</a>
102 <div id=
"report-{{ report.id }}"
103 class=
"report_wrapper">
104 <div class=
"report_author">
105 <img src=
"{{ request.staticdirect(
106 '/images/icon_clipboard_alert.png') }}"
107 alt=
"Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
108 Distributed by the GNOME project http://www.gnome.org" />
109 <a href=
"{{ request.urlgen('mediagoblin.moderation.users_detail',
110 user=report.reporter.username) }}"
111 class=
"report_authorlink">
112 {{- report.reporter.username -}}
114 <a href=
"{{ request.urlgen('mediagoblin.moderation.reports_detail',
115 report_id=report.id) }}"
116 class=
"report_whenlink">
117 <span title='{{- report.created.strftime(
"%I:%M%p %Y-%m-%d") -}}'
>
118 {%- trans formatted_time=timesince(report.created) -%}
119 {{ formatted_time }} ago
124 <div class=
"report_content">
125 {{ report.report_content }}
128 {% if not report.is_archived_report() and not (report.reported_user.has_privilege('admin') and not request.user.has_privilege('admin')) %}
129 <input type=button value=Resolve id=open_resolution_form
/>
130 <form action=
"" method=
"POST" id=resolution_form
>
131 {{ wtforms_util.render_divs(form) }}
133 <input type=submit
id=
"submit_this_report" value=
"Resolve This Report"/>
136 $(document).ready(function() {
137 init_report_resolution_form();
140 {% elif not (report.reported_user.has_privilege('admin')) %}
141 <h2><img src=
"{{ request.staticdirect('/images/icon_clipboard.png') }}"
142 alt=
"Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
143 Distributed by the GNOME project http://www.gnome.org" />
144 {% trans %}Status{% endtrans %}:
146 <b>{% trans %}RESOLVED{% endtrans %}
</b>
147 {{ report.resolved.strftime(
"%I:%M%p %Y-%m-%d") }}
148 {% autoescape False %}
149 <p>{{ report.result }}
</p>
152 <input type=button disabled=disabled
value=
"Resolve This Report"/>
153 <p>You cannot take action against an administrator
</p>