<div class="head">{{ title }}</div>
<div class="forumList">
{% for forum in forum.forums %}
{{ forum.perms.view ? 'yay' : 'no'}}
{% if forum.type == 1 %}
{% if forum.forums|length and forum.perms.view %}
<div class="forumCategory">
{% if forum.type != 1 %}Subforums{% else %}<a href="{{ route('forums.forum', forum.id) }}" class="clean">{{ forum.name }}</a>{% endif %}
</div>
{% include 'forum/elements/forumEntry.twig' %}
{% endfor %}
{% endif %}
{% else %}
{% if not forum.type and forum.id > 0 %}
{% set topics = forum.topics|batch(25) %}
{% set paginationPages = topics %}
{% set paginationUrl %}{{ route('forums.forum', forum.id) }}{% endset %}
{% include 'forum/elements/forumBtns.twig' %}
{% if forum.topics %}
<table class="topicList">
<thead>
<tr>
<th></th>
<th>Topic</th>
<th>Author</th>
<th>Last post</th>
</tr>
</thead>
<tfoot>
</tfoot>
<tbody>
{% for topic in topics[get.page|default(1) - 1] %}
{% include 'forum/elements/topicEntry.twig' %}
</tbody>
</table>
<h1 class="stylised" style="margin: 2em auto; text-align: center;">There are no posts in this forum!</h1>