misuzu/templates/forum/index.twig

30 lines
1.1 KiB
Twig

{% extends 'forum/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'forum/macros.twig' import forum_category_listing %}
{% set title = 'Forum Listing' %}
{% set canonical_url = url('forum-index') %}
{% block content %}
{% if forum_root.children|length is empty %}
<div class="container">
{{ container_title('<i class="fas fa-comment-slash fa-fw"></i> Forums') }}
<div class="container__content">
<p>There are currently no visible forums.</p>
</div>
</div>
{% else %}
{% for category in forum_root.children %}
{% if category.children is not empty %}
{{ forum_category_listing(category, current_user|default(null)) }}
{% endif %}
{% endfor %}
{% if current_user is defined %}
<div class="container forum__actions">
<a href="{{ url('forum-mark-global') }}" class="input__button forum__actions__button" data-msz-method="POST">Mark All Read</a>
</div>
{% endif %}
{% endif %}
{% endblock %}