{% extends 'layouts/app.twig' %} {% import 'macros/base.twig' as m %} {% block title %}{{ not only_meetings|default(false) ? __('news.title') : __('news.title.meetings') }}{% endblock %} {% block content %}

{{ block('title') }} {%- if has_permission_to('admin_news') and is_overview|default(false) -%} {{ m.button(__('news.add'), url('admin/news')) }} {%- endif %}

{% include 'layouts/parts/messages.twig' %}
{% block news %} {% for news in news %} {{ _self.news(news, true, is_overview) }} {% endfor %} {% endblock %}
{% block comments %} {% endblock %} {% block pagination %} {% if pages|default(0) > 1 %}
    {% for p in range(1, pages) %} {{ p }} {% endfor %}
{% endif %} {% endblock %} {% block write_comment %} {% endblock %}
{% endblock %} {% macro news(news, show_comments_link, is_overview) %}
{% if is_overview|default(false) %}

{% if news.is_meeting %}{{ __('news.is_meeting') }}{% endif %} {{ news.title }}

{% endif %}
{{ news.text|raw|nl2br }}
{% endmacro %}