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() and report.comment %}
35 {% trans %}Reported comment{% endtrans %}:
36 {% set comment = report.comment %}
37 {% set reported_user = comment.get_author %}
38 <div id="comment-{{ comment.id }}"
39 class="comment_wrapper">
40 <div class="comment_author">
41 <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
42 <a href="{{ request.urlgen('mediagoblin.moderation.users_detail',
43 user=comment.get_author.username) }}"
44 class="comment_authorlink">
45 {{- reported_user.username -}}
47 <a href="{{ request.urlgen(
48 'mediagoblin.user_pages.media_home.view_comment',
50 user=comment.get_media_entry.get_uploader.username,
51 media=comment.get_media_entry.slug_or_id) }}#comment"
52 class="comment_whenlink">
53 <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
54 {%- trans formatted_time=timesince(comment.created) -%}
55 {{ formatted_time }} ago
59 <div class=comment_content>
60 {% autoescape False %}
61 {{ comment.content_html }}
65 {% elif report.is_media_entry_report() and report.media_entry %}
67 {% set media_entry = report.media_entry %}
68 <div class="media_thumbnail">
69 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home',
70 user=media_entry.get_uploader.username,
71 media=media_entry.slug_or_id) }}">
72 <img src="{{ media_entry.thumb_url}}"/></a>
73 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home',
74 user=media_entry.get_uploader.username,
75 media=media_entry.slug_or_id) }}" class=thumb_entry_title>
76 {{ media_entry.title }}</a>
78 <div class=clear></div>
80 {% trans user_name=report.reported_user.username,
81 user_url=request.urlgen(
82 'mediagoblin.moderation.users_detail',
83 user=report.reported_user.username) %}
84 ❖ Reported media by <a href="{{ user_url }}">{{ user_name }}</a>
87 <div class=clear></div>
89 <h2>{% trans user_url=request.urlgen(
90 'mediagoblin.moderation.users_detail',
91 user=report.reporter.username),
92 user_name=report.reported_user.username %}
94 <a href="{{ user_url }}"> {{ user_name }}</a>
100 <div id="report-{{ report.id }}"
101 class="report_wrapper">
102 <div class="report_author">
103 <img src="{{ request.staticdirect(
104 '/images/icon_clipboard_alert.png') }}"
105 alt="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
106 Distributed by the GNOME project http://www.gnome.org" />
107 <a href="{{ request.urlgen('mediagoblin.moderation.users_detail',
108 user=report.reporter.username) }}"
109 class="report_authorlink">
110 {{- report.reporter.username -}}
112 <a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
113 report_id=report.id) }}"
114 class="report_whenlink">
115 <span title='{{- report.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
116 {%- trans formatted_time=timesince(report.created) -%}
117 {{ formatted_time }} ago
122 <div class="report_content">
123 {{ report.report_content }}
126 {% if not report.is_archived_report() and not (report.reported_user.has_privilege('admin') and not request.user.has_privilege('admin')) %}
127 <input type=button value=Resolve id=open_resolution_form />
128 <form action="" method="POST" id=resolution_form>
129 {{ wtforms_util.render_divs(form) }}
131 <input type=submit id="submit_this_report" value="Resolve This Report"/>
134 $(document).ready(function() {
135 init_report_resolution_form();
138 {% elif report.is_archived_report() %}
139 <h2><img src="{{ request.staticdirect('/images/icon_clipboard.png') }}"
140 alt="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
141 Distributed by the GNOME project http://www.gnome.org" />
142 {% trans %}Status{% endtrans %}:
144 <b>{% trans %}RESOLVED{% endtrans %}</b>
145 {{ report.resolved.strftime("%I:%M%p %Y-%m-%d") }}
147 <p>{{ report.result }}</p>
150 <input type=button disabled=disabled value="Resolve This Report"/>
151 <p>You cannot take action against an administrator</p>