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" %}
23 {%- trans username=user.username -%}
25 {%- endtrans %}
— {{ super() }}
32 {% block mediagoblin_content -%}
35 <p>{% trans %}Sorry, no such user found.{% endtrans %}
</p>
37 {# User exists, but needs verification #}
38 {% elif user.status ==
"needs_email_verification" %}
39 <div class=
"form_box">
40 <h1>{% trans %}Email verification needed{% endtrans %}
</h1>
44 Someone has registered an account with this username, but it still has
50 {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
51 If you are that person but you've lost your verification email, you can
52 <a href=
"{{ login_url }}">log in
</a> and resend it.
57 {# Active(?) (or at least verified at some point) user, horray! #}
60 {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
61 {% if user_banned and user_banned.expiration_date %}
62 — BANNED until {{ user_banned.expiration_date }}
63 {% elif user_banned %}
64 — Banned Indefinitely
68 {% if not user.url and not user.bio %}
69 <div class=
"profile_sidebar empty_space">
72 This user hasn't filled in their profile (yet).
76 <div class=
"profile_sidebar">
77 {% include
"mediagoblin/utils/profile.html" %}
78 {% if request.user and
79 (request.user.id == user.id or request.user.is_admin) %}
80 <a href=
"{{ request.urlgen('mediagoblin.edit.profile',
81 user=user.username) }}">
82 {%- trans %}Edit profile{% endtrans -%}
87 <a href=
"{{ request.urlgen('mediagoblin.user_pages.collection_list',
88 user=user.username) }}">
89 {%- trans %}Browse collections{% endtrans -%}
95 <h2>{%- trans %}Active Reports on {% endtrans -%}{{ user.username }}
</h2>
96 {% if reports.count() %}
97 <table class=
"admin_side_panel">
99 <th>{%- trans %}Report ID{% endtrans -%}
</th>
100 <th>{%- trans %}Reported Content{% endtrans -%}
</th>
101 <th>{%- trans %}Description of Report{% endtrans -%}
</th>
103 {% for report in reports %}
106 <img src=
"{{ request.staticdirect('/images/icon_clipboard.png') }}" />
107 <a href=
"{{ request.urlgen('mediagoblin.moderation.reports_detail',
108 report_id=report.id) }}">
109 {%- trans %}Report #{% endtrans -%}{{ report.id }}
113 {% if report.discriminator ==
"comment_report" %}
114 <a>{%- trans %}Reported Comment{% endtrans -%}
</a>
115 {% elif report.discriminator ==
"media_report" %}
116 <a>{%- trans %}Reported Media Entry{% endtrans -%}
</a>
119 <td>{{ report.report_content[:
21] }}{% if report.report_content|count
>20 %}...{% endif %}
</td>
120 <td>{%- trans %}Resolve{% endtrans -%}
</td>
123 <tr><td></td><td></td>
126 {%- trans %}No active reports filed on {% endtrans -%} {{ user.username }}
128 <a class=
"right_align">{{ user.username }}'s report history
</a>
129 <span class=clear
></span>
130 <h2>{{ user.username }}'s Privileges
</h2>
131 <form action=
"{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
132 user=user.username) }}"
134 <table class=
"admin_side_panel">
136 <th>{% trans %}Privilege{% endtrans %}
</th>
137 <th>{% trans %}User Has Privilege{% endtrans %}
</th>
139 {% for privilege in privileges %}
141 <td>{{ privilege.privilege_name }}
</td>
142 {% if privilege in user.all_privileges %}
143 <td class=
"user_with_privilege">
145 <td class=
"user_without_privilege">
148 {% if requesting_user_privileges.admin%}
149 <td>{% if privilege in user.all_privileges %}
150 <input type=submit
id=
"{{ privilege.privilege_name }}" class=submit_button value =
"-" />{% else %}
151 <input type=submit
id=
"{{ privilege.privilege_name }}" class=submit_button value =
"+" />{% endif %}
159 <input type=hidden name=privilege_name id=hidden_privilege_name
/>
163 $(document).ready(function(){
164 $('.submit_button').click(function(){
165 $('#hidden_privilege_name').val($(this).attr('id'));