mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
108 lines
3.4 KiB
Twig
108 lines
3.4 KiB
Twig
<h1>{{ "Calendar"|trans }}</h1>
|
|
|
|
<dl class="chill_view_data">
|
|
<dt class="inline">{{ 'main user concerned'|trans }}</dt>
|
|
<dd>{{ entity.mainUser }}</dd>
|
|
</dl>
|
|
|
|
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
|
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %}
|
|
|
|
|
|
<h2 class="chill-red">{{ 'Calendar data'|trans }}</h2>
|
|
|
|
{% if entity.endDate.diff(entity.startDate).days >= 1 %}
|
|
<dt>{{ "From the day"|trans }} {{ entity.startDate|format_datetime('medium', 'short') }}
|
|
{{ "to the day"|trans }} {{ entity.endDate|format_datetime('medium', 'short') }}
|
|
</dt>
|
|
<dd></dd>
|
|
{% else %}
|
|
<dt>
|
|
{{ entity.startDate|format_date('full') }},
|
|
{{ entity.startDate|format_datetime('none', 'short', locale='fr') }} - {{ entity.endDate|format_datetime('none', 'short', locale='fr') }}
|
|
</dt>
|
|
<dd></dd>
|
|
{% endif %}
|
|
|
|
<dt class="inline">{{ 'cancel reason'|trans }}</dt>
|
|
<dd>
|
|
{% if entity.cancelReason is not null %}
|
|
{{ entity.cancelReason.canceledBy|localize_translatable_string }}
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'Unknown'|trans }}</span>
|
|
{% endif %}
|
|
</dd>
|
|
|
|
<dt class="inline">{{ 'status'|trans }}</dt>
|
|
<dd>{{ entity.status }}</dd>
|
|
|
|
{% if not entity.comment.isEmpty %}
|
|
<dt class="inline">{{ 'calendar comment'|trans }}</dt>
|
|
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
|
|
{% endif %}
|
|
|
|
<dt class="inline">{{ 'sendSMS'|trans }}</dt>
|
|
<dd>
|
|
{% if entity.sendSMS is not null %}
|
|
{% if entity.sendSMS %}{{ 'Yes'|trans }}{% else %}{{ 'No'|trans }}{% endif %}
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'Unknown'|trans }}</span>
|
|
{% endif %}
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
{% set accompanying_course_id = null %}
|
|
{% if accompanyingCourse %}
|
|
{% set accompanying_course_id = accompanyingCourse.id %}
|
|
{% endif %}
|
|
|
|
{% set user_id = null %}
|
|
{% if user %}
|
|
{% set user_id = user.id %}
|
|
{% endif %}
|
|
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class="cancel">
|
|
<a class="btn btn-cancel" href="{{ path('chill_calendar_calendar_list',
|
|
{ 'accompanying_period_id': accompanying_course_id, 'user_id': user_id }) }}">
|
|
{{ 'Back to the list'|trans }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="btn btn-create" href="{{ chill_path_add_return_path('chill_activity_activity_new',
|
|
{ 'accompanying_period_id': accompanying_course_id, 'activityData': activityData }) }}">
|
|
{{ 'Transform to activity'|trans }}
|
|
</a>
|
|
</li>
|
|
{% if accompanyingCourse %}
|
|
<li>
|
|
<a class="btn btn-update" href="{{ path('chill_calendar_calendar_edit',
|
|
{ 'id': entity.id, 'accompanying_period_id': accompanying_course_id }) }}">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if user %}
|
|
<li>
|
|
<a class="btn btn-update" href="{{ path('chill_calendar_calendar_edit', { 'id': entity.id, 'user_id': user_id }) }}">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{# TODO
|
|
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
|
|
#}
|
|
|
|
<li>
|
|
<a href="{{ path('chill_calendar_calendar_delete', { 'id': entity.id, 'accompanying_period_id': accompanying_course_id, 'user_id': user_id } ) }}" class="btn btn-delete">
|
|
{{ 'Delete'|trans }}
|
|
</a>
|
|
</li>
|
|
|
|
{#
|
|
{% endif %}
|
|
#}
|
|
</ul>
|