misuzu/templates/forum/forum.twig

34 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-10-15 23:00:17 +00:00
{% from 'forum/macros.twig' import forum_category_listing, forum_topic_listing, forum_category_buttons, forum_header %}
2018-05-18 01:20:27 +00:00
{% set title = forum_info.forum_name %}
2018-07-07 20:11:16 +00:00
{% set canonical_url = '/forum/forum.php'|url_construct({
'f': forum_info.forum_id,
'o': forum_offset,
}) %}
2018-05-18 01:20:27 +00:00
{% block content %}
2018-10-21 22:11:14 +00:00
{{ forum_header(forum_info.forum_name, forum_breadcrumbs, true) }}
2018-05-18 01:20:27 +00:00
2018-10-21 22:11:14 +00:00
{% if forum_may_have_children and forum_info.forum_subforums|length > 0 %}
{{ forum_category_listing(forum_info.forum_subforums, 'Forums') }}
{% endif %}
2018-05-18 01:20:27 +00:00
2018-10-21 22:11:14 +00:00
{% if forum_may_have_topics %}
{% set fcbuttons = current_user is defined ? forum_category_buttons(forum_info, forum_perms) : '' %}
{% set fcpagination = pagination(
forum_info.forum_topic_count,
forum_range,
forum_offset,
'/forum/forum.php'|url_construct({'f': forum_info.forum_id}), 'forum__'
) %}
2018-05-20 20:12:45 +00:00
2018-10-21 22:11:14 +00:00
{{ fcbuttons }}
{{ fcpagination }}
{{ forum_topic_listing(forum_topics) }}
{{ fcpagination }}
{{ fcbuttons }}
{% endif %}
2018-05-18 01:20:27 +00:00
{% endblock %}