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

{% block title %}{% if is_page or is_forum_comment %}Новый комментарий{% elseif is_forum_topic %}Новая тема{% endif %}{% endblock %}
{% block title_extra %}{{ title_extra }}{% endblock %}
{% block css %}
    {% if not is_mobile %}
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/utilites/css/bbcode.css') }}" />
    {% else %}
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/utilites/css/bbcode_m.css') }}" />
    {% endif %}
{% endblock %}
{% block js %}
    {{ include('::bbcode-options-js.html.twig') }}
    <script type="text/javascript" src="{{ asset('bundles/utilites/js/bbcode.js') }}"></script>
{% endblock %}

{% block body %}

{% if breadcrumbs %}
<div class="breadcrumbs">
{{ breadcrumbs|raw }}
</div>
{% endif %}

{% if is_page or is_forum_comment %}
<p>
{{ getLangVar('comments', 'post_preamble', 'Post preamble.')|raw }}
</p>
{% elseif is_forum_topic %}
<p>
{{ getLangVar('comments', 'forum_topic_post_preamble', getLangVar('comments', 'post_preamble', 'Post preamble.'))|raw }}
</p>
{% endif %}

{{ form|raw }}


{% if last_comments|length > 0 %}
{# Последние комментарии #}
<h2>Последние комментарии</h2>
{% for comment in last_comments %}
<div class="comment">
<div class="comment-time">{{ comment.time }}</div>
{% if not comment.is_link %}
<div class="comment-name">{{ comment.name|raw }}</div>
{% elseif comment.is_link %}
<div class="comment-name comment-name-link">Дебри-ДВ</div>
{% endif %}
{% if not comment.is_link %}
<div class="comment-message">{{ comment.message|raw }}</div>
{% else %}
<div class="comment-message">Комментарии перенесены:
<br />{{ comment.link_breadcrumbs|raw }}
</div>
{% endif %}
</div>
{% endfor %}

{% endif %}

{% endblock %}