{% extends is_mobile ? "::base_m.html.twig" : "::base.html.twig" %}

{% block title %}Форум{% endblock %}

{% block body %}
{% for category in categories %}
<div class="forum-category">
    <div class="forum-category-title">
        <a href="{{ category.link }}">{{ category.title }}</a>
    </div>
    <div class="forum-category-description">
        {{ category.description }}
    </div>
    <div class="forum-category-premoderate">
        {% if category.premoderate %}Премодерация включена{% else %}Премодерация выключена{% endif %}
    </div>
    <div class="forum-category-stat">
        <table border="0" callspacing="0" cellpadding="0">
            <tr>
                <td align="left" valign="middle" class="forum-category-stat-name">
                    Тем:
                </td>
                <td align="left" valign="middle" class="forum-category-stat-value">
                    {{ category.topics_count }}
                </td>
                <td align="left" valign="middle" class="forum-category-stat-name">
                    Ответов:
                </td>
                <td align="left" valign="middle" class="forum-category-stat-value">
                    {{ category.comments_count }}
                </td>
                {% if not is_mobile %}
                <td align="left" valign="middle" class="forum-category-add">
                    <a href="{{ category.post_topic_link }}">Добавить тему >></a>
                </td> 
                {% endif %}
            </tr>
            {% if is_mobile %}
            <tr>
                <td align="left" valign="top" colspan="5">
                    <a href="{{ category.post_topic_link }}">Добавить тему >></a>
                </td>
            </tr>
            {% endif %}
        </table>
    </div>
</div>
{% endfor %}
{% endblock %}

{% block javascripts %}

{% endblock %}