{# # GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #} {% extends "mediagoblin/base.html" %} {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {% block title %} {%- if user -%} {%- trans username=user.username -%} User: {{ username }} {%- endtrans %} — {{ super() }} {%- else -%} {{ super() }} {%- endif -%} {% endblock %} {%- block mediagoblin_head %} {% endblock %} {% block mediagoblin_content -%} {# If no user... #} {% if not user %}

{% trans %}Sorry, no such user found.{% endtrans %}

{# User exists, but needs verification #} {% elif not user.has_privilege('active') %}

{% trans %}Email verification needed{% endtrans %}

{% trans -%} Someone has registered an account with this username, but it still has to be activated. {%- endtrans %}

{# Active(?) (or at least verified at some point) user, horray! #} {% else %} {% trans %}Return to Users Panel{% endtrans %}

{%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} {% if user_banned and user_banned.expiration_date %} — BANNED until {{ user_banned.expiration_date }} {% elif user_banned %} — Banned Indefinitely {% endif %}

{% if not user.url and not user.bio %}

{% trans -%} This user hasn't filled in their profile (yet). {%- endtrans %}

{% else %}
{% include "mediagoblin/utils/profile.html" %} {% if request.user and (request.user.id == user.id or request.user.has_privilege('admin')) %} {%- trans %}Edit profile{% endtrans -%} {% endif %} {% endif %}

{%- trans %}Browse collections{% endtrans -%}

{% endif %} {% if user %}

{%- trans %}Active Reports on {% endtrans -%}{{ user.username }}

{% if reports.count() %} {% for report in reports %} {% endfor %}
{%- trans %}Report ID{% endtrans -%} {%- trans %}Reported Content{% endtrans -%} {%- trans %}Description of Report{% endtrans -%}
{%- trans %}Report #{% endtrans -%}{{ report.id }} {% if report.discriminator == "comment_report" %} {%- trans %}Reported Comment{% endtrans -%} {% elif report.discriminator == "media_report" %} {%- trans %}Reported Media Entry{% endtrans -%} {% endif %} {{ report.report_content[:21] }} {% if report.report_content|count >20 %}...{% endif %} {%- trans %}Resolve{% endtrans -%}
{% else %} {%- trans %}No active reports filed on {% endtrans -%} {{ user.username }} {% endif %} {%- trans username=user.username %}All reports on {{ username }}{% endtrans %} · {%- trans username=user.username %}All reports that {{ username }} has filed{% endtrans %}

{{ user.username }}'s Privileges

{{ csrf_token }} {% if request.user.has_privilege('admin') and not user_banned and not user.id == request.user.id %} {{ wtforms_util.render_divs(ban_form) }} {% elif request.user.has_privilege('admin') and not user.id == request.user.id %} {% endif %}
{% for privilege in privileges %} {% if privilege in user.all_privileges %} {% if request.user.has_privilege('admin') %} {% endif %} {% endfor %}
{% trans %}Privilege{% endtrans %} {% trans %}User Has Privilege{% endtrans %}
{{ privilege.privilege_name }} Yes{% else %} No{% endif %} {% if privilege in user.all_privileges %} {% else %} {% endif %}
{{ csrf_token }}
{% endif %} {% endblock %}