mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-18 08:14:24 +00:00
51 lines
1.8 KiB
Twig
51 lines
1.8 KiB
Twig
{% import 'ChillEventBundle:EventReason:macro.html.twig' as m %}
|
|
|
|
{% if "now"|date('U') > event.date|date('U') %}
|
|
{% set boolDate = 'past' %}
|
|
{% else %}
|
|
{% set boolDate = 'futur' %}
|
|
{% endif %}
|
|
|
|
<div>
|
|
<h3>{{ event.date|format_date('long', 'short') }}
|
|
<span class="event"> /
|
|
{% if boolDate|trans == 'futur' %}
|
|
<span class="chill-orange">Prochain</span> événement
|
|
{% else %}
|
|
{{ 'Event'|trans }} <span class="chill-light-gray">passé</span>
|
|
{% endif %}
|
|
</span>
|
|
</h3>
|
|
<div class="statement">
|
|
<ul class="statement">
|
|
<li>{{ event.name }}</li>
|
|
<li>{{ 'Type: ' ~ event.type.name|localize_translatable_string }}</li>
|
|
</ul>
|
|
|
|
|
|
{% if is_granted(constant('Chill\\ActivityBundle\\Security\\Authorization\\ActivityVoter::SEE_DETAILS'), event) %}
|
|
<dl class="chill_view_data">
|
|
<dt class="inline">{{ 'Remark'|trans }}</dt>
|
|
<dd>{% if event.remark is empty %}{{ 'No remarks'|trans }}{% else %}<blockquote class="chill-user-quote">{{ event.remark|nl2br }}</blockquote>{% endif %}</dd>
|
|
|
|
<dt class="inline">{{ 'Reasons'|trans }}</dt>
|
|
{%- if event.reasons is empty -%}
|
|
<dd><span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span></dd>
|
|
{%- else -%}
|
|
<dd>{% for r in event.reasons %}{{ m.reason(r) }} {% endfor %}</dd>
|
|
{%- endif -%}
|
|
|
|
</dl>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('chill_event__event_show', { 'event_id': event.id} ) }}" class="sc-button bt-view">
|
|
{{ 'Show the event'|trans }}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|