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>
36 {# User exists, but needs verification #}
37 {% elif user.status ==
"needs_email_verification" %}
38 <div class=
"form_box">
39 <h1>{% trans %}Email verification needed{% endtrans %}
</h1>
42 Someone has registered an account with this username, but it still has
48 {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
49 If you are that person but you've lost your verification email, you can
50 <a href=
"{{ login_url }}">log in
</a> and resend it.
55 {# Active(?) (or at least verified at some point) user, horray! #}
57 <a href=
"{{ request.urlgen('mediagoblin.moderation.users') }}"
58 class=
"return_to_panel button_action"
59 title=
"Return to Users Panel">
60 {% trans %}Return to Users Panel{% endtrans %}
</a>
62 {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
63 {% if user_banned and user_banned.expiration_date %}
64 — BANNED until {{ user_banned.expiration_date }}
65 {% elif user_banned %}
66 — Banned Indefinitely
69 {% if not user.url and not user.bio %}
70 <div class=
"profile_sidebar empty_space">
73 This user hasn't filled in their profile (yet).
77 <div class=
"profile_sidebar">
78 {% include
"mediagoblin/utils/profile.html" %}
79 {% if request.user and
80 (request.user.id == user.id or request.user.has_privilege('admin')) %}
81 <a href=
"{{ request.urlgen('mediagoblin.edit.profile',
82 user=user.username) }}">
83 {%- trans %}Edit profile{% endtrans -%}
88 <a href=
"{{ request.urlgen('mediagoblin.user_pages.collection_list',
89 user=user.username) }}">
90 {%- trans %}Browse collections{% endtrans -%}
96 <h2>{%- trans %}Active Reports on {% endtrans -%}{{ user.username }}
</h2>
97 {% if reports.count() %}
98 <table class=
"admin_side_panel">
100 <th>{%- trans %}Report ID{% endtrans -%}
</th>
101 <th>{%- trans %}Reported Content{% endtrans -%}
</th>
102 <th>{%- trans %}Description of Report{% endtrans -%}
</th>
104 {% for report in reports %}
107 <img src=
"{{ request.staticdirect('/images/icon_clipboard.png') }}" />
108 <a href=
"{{ request.urlgen('mediagoblin.moderation.reports_detail',
109 report_id=report.id) }}">
110 {%- trans %}Report #{% endtrans -%}{{ report.id }}
114 {% if report.discriminator ==
"comment_report" %}
115 <a>{%- trans %}Reported Comment{% endtrans -%}
</a>
116 {% elif report.discriminator ==
"media_report" %}
117 <a>{%- trans %}Reported Media Entry{% endtrans -%}
</a>
120 <td>{{ report.report_content[:
21] }}
121 {% if report.report_content|count
>20 %}...{% endif %}
</td>
122 <td>{%- trans %}Resolve{% endtrans -%}
</td>
125 <tr><td></td><td></td>
128 {%- trans %}No active reports filed on {% endtrans -%} {{ user.username }}
130 <a class=
"right_align">{{ user.username }}'s report history
</a>
131 <span class=clear
></span>
132 <h2>{{ user.username }}'s Privileges
</h2>
133 {% if request.user.has_privilege('admin') and not user_banned and
134 not user.id == request.user.id %}
135 <input type=button
class=
"button_action right_align"
137 {% elif request.user.has_privilege('admin') and
138 not user.id == request.user.id %}
139 <input type=button
class=
"button_action right_align"
140 value=
"UnBan User" />
142 <form action=
"{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
143 user=user.username) }}"
145 <table class=
"admin_side_panel">
147 <th>{% trans %}Privilege{% endtrans %}
</th>
148 <th>{% trans %}User Has Privilege{% endtrans %}
</th>
150 {% for privilege in privileges %}
152 <td>{{ privilege.privilege_name }}
</td>
153 {% if privilege in user.all_privileges %}
154 <td class=
"user_with_privilege">
156 <td class=
"user_without_privilege">
159 {% if request.user.has_privilege('admin') %}
161 {% if privilege in user.all_privileges %}
162 <input type=submit
id=
"{{ privilege.privilege_name }}"
163 class=
"submit_button button_action"
166 <input type=submit
id=
"{{ privilege.privilege_name }}"
167 class=
"submit_button button_action"
176 <input type=hidden name=privilege_name id=hidden_privilege_name
/>
180 $(document).ready(function(){
181 $('.submit_button').click(function(){
182 $('#hidden_privilege_name').val($(this).attr('id'));