41 lines
1.4 KiB
Twig
41 lines
1.4 KiB
Twig
<div class="content__header">{{ title }}</div>
|
|
<div class="forum-list">
|
|
{% for forum in forum.forums %}
|
|
{% if forum.type == 1 %}
|
|
{% if forum.forums|length and forum.perms.view %}
|
|
<div class="forum-list__category">
|
|
{% if forum.type != 1 %}
|
|
Subforums
|
|
{% else %}
|
|
<a class="forum-list__category-link" href="{{ route('forums.forum', forum.id) }}">
|
|
{{ forum.name }}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
{% for forum in forum.forums %}
|
|
{% include 'forum/elements/forumEntry.twig' %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% include 'forum/elements/forumEntry.twig' %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% if not forum.type and forum.id > 0 %}
|
|
{% set topics = forum.topics|batch(25) %}
|
|
|
|
{% set pagination_pages = topics %}
|
|
{% set pagination_url %}{{ route('forums.forum', forum.id) }}{% endset %}
|
|
|
|
{% include 'forum/elements/forumBtns.twig' %}
|
|
|
|
{% if forum.topics %}
|
|
{% for topic in topics[get.page|default(1) - 1] %}
|
|
{% include 'forum/elements/topicEntry.twig' %}
|
|
{% endfor %}
|
|
{% else %}
|
|
<h1 class="forum-list__empty">There are no posts in this forum!</h1>
|
|
{% endif %}
|
|
|
|
{% include 'forum/elements/forumBtns.twig' %}
|
|
{% endif %}
|