This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/templates/yuuno/forum/forum.twig

56 lines
1.9 KiB
Twig
Raw Normal View History

<div class="head">{{ title }}</div>
<div class="forumList">
{% for forum in forum.forums %}
{% if forum.type == 1 %}
2015-12-29 21:52:19 +00:00
{% if forum.forums|length and forum.permission(constant('Sakura\\Perms\\Forum::VIEW'), user.id) %}
<div class="forumCategory">
{% if forum.type != 1 %}Subforums{% else %}<a href="{{ urls.format('FORUM_SUB', [forum.id]) }}" class="clean">{{ forum.name }}</a>{% endif %}
</div>
{% for forum in forum.forums %}
2016-01-04 20:14:09 +00:00
{% include 'forum/forumEntry.twig' %}
2015-12-29 21:52:19 +00:00
{% endfor %}
{% endif %}
{% else %}
2016-01-04 20:14:09 +00:00
{% include 'forum/forumEntry.twig' %}
{% endif %}
{% endfor %}
</div>
{% if not forum.type and forum.id > 0 %}
{% set threads = forum.threads|batch(25) %}
{% set paginationPages = threads %}
{% set paginationUrl %}{{ urls.format('FORUM_SUB', [forum.id]) }}{% endset %}
2016-01-04 20:14:09 +00:00
{% include 'forum/forumBtns.twig' %}
{% if forum.threads %}
2015-06-28 14:43:46 +00:00
<table class="topicList">
<thead>
<tr>
<th></th>
<th>Topic</th>
<th>Author</th>
<th></th>
<th>Last post</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>Topic</th>
<th>Author</th>
<th></th>
<th>Last post</th>
</tr>
</tfoot>
<tbody>
{% for thread in threads[get.page|default(1) - 1] %}
2016-01-04 20:14:09 +00:00
{% include 'forum/topicEntry.twig' %}
2015-06-28 14:43:46 +00:00
{% endfor %}
</tbody>
</table>
{% else %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">There are no posts in this forum!</h1>
{% endif %}
2016-01-04 20:14:09 +00:00
{% include 'forum/forumBtns.twig' %}
2015-06-27 19:29:37 +00:00
{% endif %}