misuzu/templates/forum/topic.twig

36 lines
1.1 KiB
Twig

{% extends 'forum/master.twig' %}
{% from 'macros.twig' import pagination %}
{%
from 'forum/macros.twig'
import
forum_post_listing,
forum_topic_buttons,
forum_topic_locked,
forum_posting_form,
forum_header,
forum_topic_tools
%}
{% set title = topic_info.topic_title %}
{% set canonical_url = '/forum/topic.php'|url_construct({
't': topic_info.topic_id,
'o': topic_offset,
}) %}
{% set can_reply = current_user is defined and topic_info.topic_locked is null and not topic_info.topic_archived %}
{% set topic_tools = forum_topic_tools(topic_info, topic_range, topic_offset, can_reply) %}
{% block content %}
{{ forum_header(topic_info.topic_title, topic_breadcrumbs) }}
{{ forum_topic_locked(topic_info.topic_locked, topic_info.topic_archived) }}
{{ topic_tools }}
{{ forum_post_listing(topic_posts, topic_info.topic_first_post_id) }}
{% if can_reply %}
{{ forum_posting_form('Reply', topic_info.topic_id, true, 'reply', true) }}
{% endif %}
{{ topic_tools }}
{% endblock %}