mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-18 16:24:24 +00:00
78 lines
3.2 KiB
Twig
78 lines
3.2 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">{{ 'Opening date'|trans }}</th>
|
|
<th class="chill-green">{{ 'Closing date'|trans }}</th>
|
|
<th class="chill-orange">{{ 'Remark'|trans }}</th>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
</thead>
|
|
<tbody>
|
|
{% for accompanying_period in accompanying_periods %}
|
|
<tr>
|
|
<td>{{ accompanying_period.openingDate|localizeddate('long', 'none', app.request.locale) }}</td>
|
|
<td>{% spaceless %}
|
|
{% if accompanying_period.isOpen %}
|
|
{{ 'Period opened'|trans }}
|
|
{% else %}
|
|
{{ accompanying_period.closingDate|localizeddate('long', 'none', app.request.locale) }}
|
|
{% endif %}
|
|
{% endspaceless %}</td>
|
|
<td>
|
|
{{ accompanying_period.remark }}
|
|
</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">
|
|
{{ 'Edit'|trans }}
|
|
</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">
|
|
<i class="fa fa-lock" aria-hidden="true"></i> {{'Close accompanying period'|trans }}
|
|
</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">
|
|
{{'Re-open accompanying period'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="form_control">
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}" class="sc-button bt-create">
|
|
{{ 'Add an accompanying period in the past'|trans }}
|
|
</a>
|
|
</li>
|
|
{% if person.isOpen == false %}
|
|
<li>
|
|
<a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}" class="sc-button bt-create">
|
|
<i class="fa fa-unlock" aria-hidden="true"></i>{{'Begin a new accompanying period'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
|
|
{% endblock personcontent %} |