Merge branch 'stable'
[mediagoblin.git] / mediagoblin / templates / mediagoblin / user_pages / 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_content -%}
21 {% trans %}<h2>File a Report</h2>{% endtrans %}
22 <form action="" method=POST >
23 {% if comment is defined %}
24 <h3>{% trans %}Reporting this Comment{% endtrans %}</h3>
25 {%- set comment_author = comment.get_author %}
26 {%- set comment_author_url = request.urlgen(
27 'mediagoblin.user_pages.user_home',
28 user=comment_author.username) %}
29 {%- set comment_url = request.urlgen(
30 'mediagoblin.user_pages.media_home.view_comment',
31 comment=comment.id,
32 user=media.get_uploader.username,
33 media=media.slug_or_id) %}
34 <div id="comment-{{ comment.id }}"
35 class="comment_wrapper">
36 <div class="comment_author">
37 <img
38 src="{{ request.staticdirect('/images/icon_comment.png') }}" />
39 <a href="{{ comment_author_url }}"
40 class="comment_authorlink">
41 {{- comment_author.username -}}
42 </a>
43 <a href="{{ comment_url }}"
44 class="comment_whenlink">
45 <span
46 title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
47
48 {%- trans formatted_time=timesince(comment.created) -%}
49 {{ formatted_time }} ago
50 {%- endtrans -%}
51 </span></a>:
52 </div>
53 <div class="comment_content">
54 {% autoescape False -%}
55 {{ comment.content_html }}
56 {%- endautoescape %}
57 </div>
58 </div>
59 {% elif media is defined %}
60 <h3>{% trans %}Reporting this Media Entry{% endtrans %}</h3>
61 <div class="media_thumbnail">
62 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home',
63 user=media.get_uploader.username,
64 media=media.slug_or_id) }}">
65 <img src="{{ media.thumb_url }}"/></a>
66 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home',
67 user=media.get_uploader.username,
68 media=media.slug_or_id) }}"
69 class=thumb_entry_title>{{ media.title }}</a>
70 </div>
71 <div class=clear></div>
72 {%- trans user_url = request.urlgen('mediagoblin.user_pages.user_home', user=media.get_uploader.username),
73 username = media.get_uploader.username %}
74 ❖ Published by <a href="{{ user_url }}"
75 class="comment_authorlink">{{ username }}</a>
76 {% endtrans %}
77 {%- endif %}
78
79 {{- wtforms_util.render_divs(form) }}
80 {{ csrf_token }}
81 <input type=submit class="button_action" value="{% trans %}File Report {% endtrans %}" />
82 </form>
83 {% endblock %}