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 %}
21 {%- block mediagoblin_content %}
23 Sorry, no such report found.
25 <h2> Report #{{ report.id }}</h2>
28 {% set reported_user = comment.get_author %}
29 <div id="comment-{{ comment.id }}"
30 class="comment_wrapper">
31 <div class="comment_author">
32 <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
33 <a href="{{ request.urlgen('mediagoblin.moderation.users_detail',
34 user=comment.get_author.username) }}"
35 class="comment_authorlink">
36 {{- reported_user.username -}}
38 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
40 user=comment.get_media_entry.get_uploader.username,
41 media=comment.get_media_entry.slug_or_id) }}#comment"
42 class="comment_whenlink">
43 <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
44 {%- trans formatted_time=timesince(comment.created) -%}
45 {{ formatted_time }} ago
49 <div class=comment_content>
50 {% autoescape False %}
51 {{ comment.content_html }}
55 {% elif media_entry %}
56 <div class="media_thumbnail">
57 <a href="request.urlgen('mediagoblin.user_pages.media_home'),
58 user=media_entry.get_uploader.username,
59 media=media_entry.slug_or_id)"><img src="{{ media_entry.thumb_url}}"/></a>
60 <a href="request.urlgen('mediagoblin.user_pages.media_home'),
61 user=media_entry.get_uploader.username,
62 media=media_entry.slug_or_id)" class=thumb_entry_title>{{ media_entry.title }}</a>
64 <div class=clear></div>
67 <div id="report-{{ report.id }}"
68 class="report_wrapper">
69 <div class="report_author">
70 <img src="{{ request.staticdirect('/images/icon_clipboard.png') }}"
71 alt="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license. Distributed by the GNOME project http://www.gnome.org" />
72 <a href="{{ request.urlgen('mediagoblin.moderation.users_detail',
73 user=report.reporter.username) }}"
74 class="report_authorlink">
75 {{- report.reporter.username -}}
77 <a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
78 report_id=report.id) }}"
79 class="report_whenlink">
80 <span title='{{- report.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
81 {%- trans formatted_time=timesince(report.created) -%}
82 {{ formatted_time }} ago
87 <div class="report_content">
88 {{ report.report_content }}
91 {% if not report.resolved %}
92 <input type=button value=Resolve id=open_resolution_form />
93 <form action="" method="POST" id=resolution_form>
94 {{ wtforms_util.render_divs(form) }}
96 <input type=submit id="submit_this_report" value="Resolve This Report"/>
101 $(document).ready(function() {
102 $('form#resolution_form').hide()
103 $('#user_banned_until').val("YYYY-MM-DD")
104 $('#open_resolution_form').click(function() {
105 $('form#resolution_form').toggle();
106 $('#user_banned_until').hide();
107 $('label[for=user_banned_until]').hide();
109 $('#action_to_resolve').change(function() {
110 if ($('ul#action_to_resolve li input:checked').val() == "userban") {
111 $('#user_banned_until').show();
112 $('label[for=user_banned_until]').show();
114 $('#user_banned_until').hide();
115 $('label[for=user_banned_until]').hide();
118 $("#user_banned_until").focus(function() {
120 $(this).unbind('focus');
122 $("#submit_this_report").click(function(){
123 if ($("#user_banned_until").val() == 'YYYY-MM-DD'){
124 $("#user_banned_until").val("");
131 RESOLVED on {{ report.resolved.strftime("%I:%M%p %Y-%m-%d") }}
132 {% autoescape False %}
133 <p>{{ report.result }}</p>