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 to be activated.
49 {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
50 If you are that person but you've lost your verification email, you can <a href="{{ login_url }}">log in</a> and resend it.
55 {# Active(?) (or at least verified at some point) user, horray! #}
58 {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
61 {% if not user.url and not user.bio %}
62 <div class="profile_sidebar empty_space">
65 This user hasn't filled in their profile (yet).
69 <div class="profile_sidebar">
70 {% include "mediagoblin/utils/profile.html" %}
71 {% if request.user and
72 (request.user.id == user.id or request.user.is_admin) %}
73 <a href="{{ request.urlgen('mediagoblin.edit.profile',
74 user=user.username) }}">
75 {%- trans %}Edit profile{% endtrans -%}
80 <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
81 user=user.username) }}">
82 {%- trans %}Browse collections{% endtrans -%}
88 <h2>{%- trans %}Active Reports on {% endtrans -%}{{ user.username }}</h2>
89 {% if reports.count() %}
90 <table class="admin_side_panel">
92 <th>{%- trans %}Report ID{% endtrans -%}</th>
93 <th>{%- trans %}Reported Content{% endtrans -%}</th>
94 <th>{%- trans %}Description of Report{% endtrans -%}</th>
96 {% for report in reports %}
99 <img src="{{ request.staticdirect('/images/icon_clipboard.png') }}" />
100 <a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
101 report_id=report.id) }}">
102 {%- trans %}Report #{% endtrans -%}{{ report.id }}
106 {% if report.discriminator == "comment_report" %}
107 <a>{%- trans %}Reported Comment{% endtrans -%}</a>
108 {% elif report.discriminator == "media_report" %}
109 <a>{%- trans %}Reported Media Entry{% endtrans -%}</a>
112 <td>{{ report.report_content[:21] }}{% if report.report_content|count >20 %}...{% endif %}</td>
113 <td>{%- trans %}Resolve{% endtrans -%}</td>
116 <tr><td></td><td></td>
119 {%- trans %}No active reports filed on {% endtrans -%} {{ user.username }}
121 <a class="right_align">{{ user.username }}'s report history</a>
122 <span class=clear></span>
123 <h2>{{ user.username }}'s Privileges</h2>
124 <table class="admin_panel">
126 <th>{% trans %}Privilege{% endtrans %}</th>
127 <th>{% trans %}User Has Privilege{% endtrans %}</th>
129 {% for privilege in privileges %}
131 <form action="{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
132 user=user.username) }}"
134 <td>{{ privilege.privilege_name }}</td>
136 {% if privilege in user.all_privileges %}Yes</td>
137 {% if (not privilege.is_admin_or_moderator() or request.user.is_admin) and not (user.is_admin and not request.user.is_admin) %}
138 <td><input type=submit value="{% trans %}Take Away{% endtrans %}" />
139 <input type=hidden name=giving_privilege />
142 {% if (not privilege.is_admin_or_moderator() or request.user.is_admin) and not (user.is_admin and not request.user.is_admin) %}
143 <td><input type=submit value="{% trans %}Give Privilege{% endtrans %}" >
144 <input type=hidden name=giving_privilege value=True />
147 <input type=hidden name=privilege_name value="{{ privilege.privilege_name }}" />