misuzu/templates/forum/forum.twig

37 lines
1.3 KiB
Twig
Raw Normal View History

2018-08-15 03:12:58 +02:00
{% extends 'forum/master.twig' %}
2018-10-25 02:15:23 +02:00
{% from 'forum/macros.twig' import forum_category_listing, forum_topic_listing, forum_category_buttons, forum_header, forum_category_tools %}
2018-05-18 03:20:27 +02:00
2023-08-28 01:17:34 +00:00
{% set title = forum_info.name %}
{% set canonical_url = url('forum-category', {
2023-08-28 01:17:34 +00:00
'forum': forum_info.id,
'page': forum_pagination.page|default(0) > 1 ? forum_pagination.page : 0,
2018-07-07 22:11:16 +02:00
}) %}
2018-05-18 03:20:27 +02:00
{% block content %}
2023-08-28 01:17:34 +00:00
{{ forum_header(forum_info.name, forum_breadcrumbs, true, canonical_url, [
{
html: '<i class="far fa-check-circle"></i> <span class="js-action-text">Mark as Read</span>',
display: forum_show_mark_as_read,
method: 'POST',
url: url('forum-mark-as-read', { category: forum_info.id }),
disableWith: 'Marking as read...',
disableWithTarget: '.js-action-text',
withCsrf: true,
refreshOnSuccess: true,
}
]) }}
2018-05-18 03:20:27 +02:00
2023-08-28 01:17:34 +00:00
{% if forum_children|length > 0 %}
{{ forum_category_listing(forum_children, 'Forums') }}
2018-10-22 00:11:14 +02:00
{% endif %}
2018-05-18 03:20:27 +02:00
2023-08-28 01:17:34 +00:00
{% if forum_info.mayHaveTopics %}
{% set category_tools = forum_category_tools(forum_info, forum_perms, forum_pagination) %}
2018-10-25 02:15:23 +02:00
{{ category_tools }}
2018-10-22 00:11:14 +02:00
{{ forum_topic_listing(forum_topics) }}
2018-10-25 02:15:23 +02:00
{{ category_tools }}
2018-10-22 00:11:14 +02:00
{% endif %}
{{ forum_header('', forum_breadcrumbs) }}
2018-05-18 03:20:27 +02:00
{% endblock %}