{# # 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 username=user.username %}{{ username }}'s profile{% endtrans -%} {% if user_banned and user_banned.expiration_date %} — {% trans expiration_date=user_banned.expiration_date -%} BANNED until {{ expiration_date }} {%- endtrans %} {% elif user_banned %} — {% trans %}Banned Indefinitely{% endtrans %} {% 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 username=user.username -%} Active Reports on {{ username }} {%- endtrans -%}

{% if reports.count() %} {% for report in reports %} {% endfor %}
{%- trans %}Report ID{% endtrans -%} {%- trans %}Reported Content{% endtrans -%} {%- trans %}Description of Report{% endtrans -%}
{%- trans report_number=report.id -%} Report #{{ report_number }} {%- endtrans -%} {% 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 username=user.username -%} No active reports filed on {{ username }} {%- endtrans -%} {% endif %}

{%- trans username=user.username %}All reports on {{ username }}{% endtrans %} · {%- trans username=user.username -%} All reports that {{ username }} has filed {%- endtrans %}

{% trans username=user.username -%} {{ username }}'s Privileges{% endtrans %}

{% for privilege in privileges %} {% if user.has_privilege(privilege.privilege_name) %} {% if request.user.has_privilege('admin') %} {% endif %} {% endfor %}
{% trans %}Privilege{% endtrans %} {% trans %}Granted{% endtrans %}
{{ privilege.privilege_name }} {% trans %}Yes{% endtrans %}{% else %} {% trans %}No{% endtrans %}{% endif %} {% if user.has_privilege(privilege.privilege_name) %} {% else %} {% endif %}
{{ csrf_token }}
{{ 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 %}
{% endif %}
{% endblock %}