misuzu/templates/forum/forum.twig

34 lines
1.1 KiB
Twig
Raw Normal View History

2018-08-15 03:12:58 +02:00
{% extends 'forum/master.twig' %}
2018-10-21 23:53:32 +02:00
{% from 'macros.twig' import pagination %}
2018-10-16 01:00:17 +02:00
{% from 'forum/macros.twig' import forum_category_listing, forum_topic_listing, forum_category_buttons, forum_header %}
2018-05-18 03:20:27 +02:00
{% set title = forum_info.forum_name %}
2018-07-07 22:11:16 +02:00
{% set canonical_url = '/forum/forum.php'|url_construct({
'f': forum_info.forum_id,
'o': forum_offset,
}) %}
2018-05-18 03:20:27 +02:00
{% block content %}
2018-10-22 00:11:14 +02:00
{{ forum_header(forum_info.forum_name, forum_breadcrumbs, true) }}
2018-05-18 03:20:27 +02:00
2018-10-22 00:11:14 +02: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 03:20:27 +02:00
2018-10-22 00:11:14 +02: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 22:12:45 +02:00
2018-10-22 00:11:14 +02:00
{{ fcbuttons }}
{{ fcpagination }}
{{ forum_topic_listing(forum_topics) }}
{{ fcpagination }}
{{ fcbuttons }}
{% endif %}
2018-05-18 03:20:27 +02:00
{% endblock %}