2020-04-05 16:54:45 +02:00
|
|
|
{% extends 'pages/news/overview.twig' %}
|
|
|
|
{% import 'macros/base.twig' as m %}
|
|
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
|
2020-05-12 00:28:28 +02:00
|
|
|
{% block title %}{% if news.is_meeting %}{{ __('news.is_meeting') }} {% endif %}{{ news.title }}{% endblock %}
|
2020-04-05 16:54:45 +02:00
|
|
|
|
|
|
|
{% block news %}
|
|
|
|
{{ _self.news(news) }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block comments %}
|
2021-07-24 12:38:23 +02:00
|
|
|
<div class="col-md-12 mt-4">
|
2020-04-05 16:54:45 +02:00
|
|
|
<h2>{{ __('news.comments') }}</h2>
|
|
|
|
|
|
|
|
{% for comment in news.comments %}
|
2021-07-24 12:38:23 +02:00
|
|
|
<div class="card {% if theme.type == 'light' %}bg-light{% else %}bg-secondary{% endif %} mb-4">
|
|
|
|
<div class="card-body {{ m.type_bg_class() }}">
|
2020-04-05 16:54:45 +02:00
|
|
|
{{ comment.text|nl2br }}
|
|
|
|
</div>
|
2021-08-05 01:00:12 +02:00
|
|
|
<div class="card-footer {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} text-muted d-flex align-items-center">
|
2021-07-24 12:38:23 +02:00
|
|
|
<div class="me-3">
|
|
|
|
{{ m.icon('clock') }}
|
|
|
|
{{ comment.created_at.format(__('Y-m-d H:i')) }}
|
|
|
|
</div>
|
2020-04-05 16:54:45 +02:00
|
|
|
{{ m.user(comment.user) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block write_comment %}
|
|
|
|
{% if has_permission_to('news_comments') %}
|
2021-07-24 12:38:23 +02:00
|
|
|
<div class="col-md-12 mt-4">
|
2020-04-05 16:54:45 +02:00
|
|
|
<h3>{{ __('news.comments.new') }}</h3>
|
|
|
|
|
|
|
|
<form action="" enctype="multipart/form-data" method="post">
|
|
|
|
{{ csrf() }}
|
|
|
|
{{ f.textarea('comment', __('news.comments.message'), {'required': true}) }}
|
|
|
|
{{ f.submit() }}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|