misuzu/views/mio/forum/topic.twig

49 lines
1.6 KiB
Twig
Raw Normal View History

2018-05-20 20:12:45 +00:00
{% extends '@mio/forum/master.twig' %}
{% from '@mio/macros.twig' import navigation, pagination %}
2018-05-23 01:41:57 +00:00
{%
from '@mio/forum/macros.twig'
import
forum_post_listing,
forum_topic_buttons,
forum_topic_locked,
forum_posting_form
%}
2018-05-20 20:12:45 +00:00
{% set title = topic_info.topic_title %}
2018-05-21 23:05:25 +00:00
{% set base_url = '/forum/topic.php?t=' ~ topic_info.topic_id %}
{% set canonical_url = base_url %}
2018-05-23 01:41:57 +00:00
{% set can_reply = app.hasActiveSession and topic_info.topic_locked is null and not topic_info.topic_archived %}
{% set ftbuttons = can_reply ? forum_topic_buttons(topic_info) : '' %}
{% set ftpagination = pagination(topic_info.topic_post_count, topic_range, topic_offset, base_url, 'forum__') %}
2018-05-20 20:12:45 +00:00
{% block content %}
{{ navigation(topic_breadcrumbs, topic_breadcrumbs|last, true, null, 'left') }}
<div class="container">
<div class="container__title">
{{ topic_info.topic_title }}
</div>
</div>
2018-05-23 01:41:57 +00:00
{{ forum_topic_locked(topic_info.topic_locked, topic_info.topic_archived) }}
2018-05-21 23:05:25 +00:00
{{ ftbuttons }}
{{ ftpagination }}
2018-05-20 20:12:45 +00:00
{{ forum_post_listing(topic_posts, topic_info.topic_first_post_id) }}
2018-05-21 23:05:25 +00:00
{{ ftpagination }}
2018-05-23 01:41:57 +00:00
{% if can_reply %}
{{ forum_posting_form('Reply', topic_info.topic_id, true, 'reply', true) }}
<script>
window.addEventListener('load', () => {
closeContainer('reply');
document.getElementById('reply').children[0].addEventListener('mouseover', () => openContainer('reply'));
});
</script>
{% endif %}
2018-05-20 20:12:45 +00:00
{{ navigation(mio_navigation, '/forum/') }}
{% endblock %}