misuzu/templates/forum/topic.twig

37 lines
1.1 KiB
Twig
Raw Normal View History

2018-08-15 01:12:58 +00:00
{% extends 'forum/master.twig' %}
2018-10-21 21:53:32 +00:00
{% from 'macros.twig' import pagination %}
2018-05-23 01:41:57 +00:00
{%
2018-08-15 01:12:58 +00:00
from 'forum/macros.twig'
2018-05-23 01:41:57 +00:00
import
forum_post_listing,
forum_topic_buttons,
forum_topic_locked,
2018-10-15 23:00:17 +00:00
forum_posting_form,
2018-10-25 00:15:23 +00:00
forum_header,
forum_topic_tools
2018-05-23 01:41:57 +00:00
%}
2018-05-20 20:12:45 +00:00
{% set title = topic_info.topic_title %}
{% set canonical_url = url_construct('/forum/topic.php', {
2018-07-07 20:11:16 +00:00
't': topic_info.topic_id,
'o': topic_offset,
}) %}
2018-05-21 23:05:25 +00:00
{% set can_reply = current_user is defined and topic_info.topic_locked is null and not topic_info.topic_archived %}
2018-10-25 00:15:23 +00:00
{% set topic_tools = forum_topic_tools(topic_info, topic_range, topic_offset, can_reply) %}
2018-05-20 20:12:45 +00:00
{% block content %}
2018-10-21 22:11:14 +00:00
{{ forum_header(topic_info.topic_title, topic_breadcrumbs) }}
2018-05-20 20:12:45 +00:00
2018-10-21 22:11:14 +00:00
{{ forum_topic_locked(topic_info.topic_locked, topic_info.topic_archived) }}
2018-05-23 01:41:57 +00:00
2018-10-25 00:15:23 +00:00
{{ topic_tools }}
2018-10-21 22:11:14 +00:00
{{ forum_post_listing(topic_posts, topic_info.topic_first_post_id) }}
2018-10-21 22:11:14 +00:00
{% if can_reply %}
{{ forum_posting_form('Reply', topic_info.topic_id, true, 'reply', true) }}
{% endif %}
2018-10-25 00:15:23 +00:00
{{ topic_tools }}
2018-05-20 20:12:45 +00:00
{% endblock %}