{% extends "cranefly/profiles/profile.html" %} {% import "cranefly/macros.html" as macros with context %} {% block title %}{{ macros.page_title(_('Warnings'), profile.username) }}{% endblock %} {% block tab %} {% if warning_level %}

{{ warning_level.name }}

{% if warning_level.description %}

{{ warning_level.description }}

{% endif %} {% if profile.warning_level_update_on %}

{% trans expires=format_warning_expiration(profile.warning_level_update_on|reldate|lower) %}This warning level will expire {{ expires }}.{% endtrans %}

{% else %}

{% trans %}This warning level will not expire and will have to be decreased manually by forum team member.{% endtrans %}

{% endif %}
{% else %}
{% if user.is_authenticated() and user.pk == profile.pk %}

{% trans username=profile.username %}{{ username }}, your account has no warning level set. Good job!{% endtrans %}

{% else %}

{% trans username=profile.username %}{{ username }}'s account has no warning level set.{% endtrans %}

{% endif %}
{% endif %}

{% if items_total -%} {%- trans count=items_total, total=items_total|intcomma, username=profile.username -%} {{ username }} received one warning {%- pluralize -%} {{ username }} received {{ total }} warnings {%- endtrans -%} {%- else -%} {% trans username=profile.username %}{{ username }} received no warnings{% endtrans %} {%- endif %}

{% if items_total %}
{% for item in items %}
{% if item.canceled %} {% elif warnings_tracker.is_warning_expired(item) %} {% else %} {% endif %}
{% if item.reason %} {{ item.reason_preparsed|safe }} {% else %} {% trans %}No warning reason was provided by warning giver.{% endtrans %} {% endif %}

{% endfor %} {{ pager() }}
{% endif %} {% endblock %} {% block javascripts -%}{{ super() }} {%- endblock %} {% macro format_warning_expiration(expires) %} {{ expires }} {% endmacro %} {% macro warning_giver(item) -%} {% if item.giver_id %} {{ item.giver_username }} {% else %} {{ item.giver_username }} {% endif %} {%- endmacro %} {% macro warning_canceler(item) -%} {% if item.canceler_id %} {{ item.canceler_username }} {% else %} {{ item.canceler_username }} {% endif %} {%- endmacro %} {% macro pager() -%} {% if pagination['total'] > 1 %} {% endif %} {%- endmacro %}