mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-24 19:16:15 +00:00
99 lines
4.6 KiB
Twig
99 lines
4.6 KiB
Twig
{% extends "ChillPersonBundle::layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = 'chill_person_accompanying_period_list' %}
|
|
|
|
{% block title %}{{ 'Person accompanying period - %name%'|trans({ '%name%' : person.__toString}) }}{% endblock title %}
|
|
|
|
{% block personcontent %}
|
|
<table class="rounded">
|
|
<thead>
|
|
<tr>
|
|
<th class="chill-red">{{ 'accompanying_period.dates'|trans }}</th>
|
|
{% if chill_accompanying_periods.fields.user == 'visible' %}
|
|
<th class="chill-blue">{{ 'Accompanying user'|trans }}</th>
|
|
{% endif %}
|
|
<th class="chill-orange">{{ 'Remark'|trans }}</th>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
</thead>
|
|
<tbody>
|
|
{% for accompanying_period in accompanying_periods %}
|
|
<tr>
|
|
<td>
|
|
{% if accompanying_period.isOpen == false %}
|
|
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|localizeddate('long', 'none') } ) }}
|
|
{% else %}
|
|
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
|
'%opening_date%': accompanying_period.openingDate|localizeddate('long', 'none'),
|
|
'%closing_date%': accompanying_period.closingDate|localizeddate('long', 'none')}
|
|
) }}
|
|
{% endif %}
|
|
</td>
|
|
{% if chill_accompanying_periods.fields.user == 'visible' %}
|
|
<td>
|
|
{% if accompanying_period.user %}
|
|
{{ accompanying_period.user.username }}
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
|
|
{% endif %}
|
|
</td>
|
|
{% endif %}
|
|
<td>
|
|
{% if accompanying_period.isOpen == false %}
|
|
<div>{{ accompanying_period.closingMotive|chill_entity_render_box }}</div>
|
|
<br/>
|
|
{% endif %}
|
|
{{ accompanying_period.remark|chill_print_or_message('No remark', 'blockquote') }}
|
|
</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-update no-content"></a>
|
|
</li>
|
|
{% if accompanying_period.isOpen == true %}
|
|
<li>
|
|
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}" class="sc-button bt-update has-hidden change-icon">
|
|
<i class="fa fa-lock" aria-hidden="true"></i><span class="show-on-hover">{{'Close accompanying period'|trans }}</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if accompanying_period.canBeReOpened == true %}
|
|
<li>
|
|
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-create change-icon has-hidden">
|
|
<i class="fa fa-unlock" aria-hidden="true"></i><span class="show-on-hover">{{'Re-open accompanying period'|trans }}</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="form_control">
|
|
<ul class="record_actions">
|
|
<li class="cancel">
|
|
<a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}" class="sc-button bt-cancel">
|
|
{{ 'Person details'|trans }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}" class="sc-button bt-create has-hidden">
|
|
<span class="show-on-hover">{{ 'Add an accompanying period in the past'|trans }}</span>
|
|
</a>
|
|
</li>
|
|
{% if person.isOpen == false %}
|
|
<li>
|
|
<a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}" class="sc-button bt-create change-icon has-hidden">
|
|
<i class="fa fa-unlock" aria-hidden="true"></i>
|
|
<span class="show-on-hover">{{'Begin a new accompanying period'|trans }}</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
|
|
{% endblock personcontent %} |