mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-24 11:06:14 +00:00
79 lines
2.9 KiB
Twig
79 lines
2.9 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>{{ 'Opening date'|trans }}</th>
|
|
<th>{{ 'Closing date'|trans }}</th>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
</thead>
|
|
<tbody>
|
|
{% set i = 0 %}
|
|
{% for accompanying_period in accompanying_periods %}
|
|
<tr class="{% if i is not even %}striped{% endif %}">
|
|
<td>{{ accompanying_period.dateOpening|localizeddate('long', 'none', app.request.locale) }}</td>
|
|
<td>{% spaceless %}
|
|
{% if accompanying_period.isOpen %}
|
|
{{ 'Still open'|trans }}
|
|
|
|
{% else %}
|
|
{{ accompanying_period.dateClosing|localizeddate('long', 'none', app.request.locale) }}
|
|
{% endif %}
|
|
|
|
{% endspaceless %}</td>
|
|
<td>
|
|
<div class="small warning btn icon-right entypo icon-pencil">
|
|
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}">{{ 'Edit'|trans }}</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% if accompanying_period.memo is not empty %}
|
|
<tr class="{% if i is not even %}striped{% endif %}">
|
|
<td colspan="3">
|
|
<pre>{{ accompanying_period.memo }}</pre>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% set i = i+1 %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<div class="form_control">
|
|
<div class="btn small warning icon-right entypo icon-plus">
|
|
<a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}">
|
|
{{ 'Create accompanying period'|trans }}
|
|
</a>
|
|
</div>
|
|
|
|
<div class="controls">
|
|
<div class="btn medium danger icon-right entypo {% spaceless %}
|
|
{% if person.isOpen == true %}
|
|
icon-lock
|
|
{% else %}
|
|
icon-lock-open
|
|
{% endif %}{% endspaceless %}">
|
|
{% spaceless %}
|
|
{% if person.isOpen == true %}
|
|
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}">
|
|
{{'Close accompanying period'|trans }}
|
|
</a>
|
|
{% else %}
|
|
<a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}">
|
|
{{'Open accompanying period'|trans }}
|
|
</a>
|
|
{% endif %}
|
|
{% endspaceless %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock personcontent %} |