{% from 'core/macros.jinja' import user_profile_link %} {% macro display_forum(forum, user) %}
{% if not forum.is_category %} {% else %} {% endif %} {% if user.is_owner(forum) %} {% trans %}Edit{% endtrans %} {% trans %}Delete{% endtrans %} {% endif %}
{% if not forum.is_category %}
{{ forum.topic_number }}
{% endif %}
{% endmacro %} {% macro display_topic(topic, user, first_unread=False) %}
{% if first_unread %} {% else %} {% endif %}
{{ topic.title }}

{{ topic.description }}

{% if user.can_edit(topic) %} {% endif %}
{{ user_profile_link(topic.author) }}
{{ topic.messages.count() }}
{% set last_msg = topic.last_message %} {% if last_msg %} {{ user_profile_link(last_msg.author) }}
{{ last_msg.date|date(DATETIME_FORMAT) }} {{ last_msg.date|time(DATETIME_FORMAT) }} {% endif %}
{% endmacro %} {% macro display_message(m, user, unread=False) %} {% if user.can_view(m) %}
{% if m.author.avatar_pict %} {% trans %}Profile{% endtrans %} {% else %} {% trans %}Profile{% endtrans %} {% endif %}
{{ m.author.get_short_name() }}
{% if m.title %}
{{ m.title }}
{% endif %}
{% trans %}Reply as quote{% endtrans %} {% if user.can_edit(m) %} {% trans %}Edit{% endtrans %} {% endif %} {% if m.can_be_moderated_by(user) %} {% if m.deleted %} {% trans %}Undelete{% endtrans %} {% else %} {% trans %}Delete{% endtrans %} {% endif %} {% endif %}
{{ m.date|localtime|date(DATETIME_FORMAT) }} {{ m.date|localtime|time(DATETIME_FORMAT) }}

{{ m.message|markdown }}
{% if m.can_be_moderated_by(user) %} {% endif %}
{{ m.author.forum_signature|markdown }}
{% else %}

{% trans %}Deleted or unreadable message.{% endtrans %}

{{ m.date|localtime|date(DATETIME_FORMAT) }} {{ m.date|localtime|time(DATETIME_FORMAT) }}

{% endif %} {{ m.mark_as_read(user) or "" }} {% endmacro %}