misuzu/templates/forum/forum.twig

33 lines
1.1 KiB
Twig
Raw Normal View History

2022-09-13 13:14:49 +00:00
{% extends 'forum/master.twig' %}
{% from 'forum/macros.twig' import forum_category_listing, forum_topic_listing, forum_category_buttons, forum_header, forum_category_tools %}
2023-08-28 01:17:34 +00:00
{% set title = forum_info.name %}
2022-09-13 13:14:49 +00:00
{% set canonical_url = url('forum-category', {
2023-08-28 01:17:34 +00:00
'forum': forum_info.id,
2022-09-13 13:14:49 +00:00
'page': forum_pagination.page|default(0) > 1 ? forum_pagination.page : 0,
}) %}
{% block content %}
2023-08-28 01:17:34 +00:00
{{ forum_header(forum_info.name, forum_breadcrumbs, true, canonical_url, [
2022-09-13 13:14:49 +00:00
{
'html': '<i class="far fa-check-circle"></i> Mark as Read',
2023-08-28 01:17:34 +00:00
'url': url('forum-mark-single', {'forum': forum_info.id}),
'display': forum_show_mark_as_read,
2022-09-13 13:14:49 +00:00
'method': 'POST',
}
]) }}
2023-08-28 01:17:34 +00:00
{% if forum_children|length > 0 %}
{{ forum_category_listing(forum_children, 'Forums') }}
2022-09-13 13:14:49 +00:00
{% endif %}
2023-08-28 01:17:34 +00:00
{% if forum_info.mayHaveTopics %}
2022-09-13 13:14:49 +00:00
{% set category_tools = forum_category_tools(forum_info, forum_perms, forum_pagination) %}
{{ category_tools }}
{{ forum_topic_listing(forum_topics) }}
{{ category_tools }}
{% endif %}
{{ forum_header('', forum_breadcrumbs) }}
{% endblock %}