mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-18 08:14:24 +00:00
79 lines
2.7 KiB
Twig
79 lines
2.7 KiB
Twig
{% extends "ChillPersonBundle::layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = 'chill_person_history_list' %}
|
|
|
|
{% block title %}{{ 'Person history - %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 history in histories %}
|
|
<tr class="{% if i is not even %}striped{% endif %}">
|
|
<td>{{ history.dateOpening|localizeddate('long', 'none', app.request.locale) }}</td>
|
|
<td>{% spaceless %}
|
|
{% if history.isOpen %}
|
|
{{ 'Still open'|trans }}
|
|
|
|
{% else %}
|
|
{{ history.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_history_update', {'person_id' : person.id, 'history_id' : history.id } ) }}">{{ 'Edit'|trans }}</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% if history.memo is not empty %}
|
|
<tr class="{% if i is not even %}striped{% endif %}">
|
|
<td colspan="3">
|
|
<pre>{{ history.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_history_create', {'person_id' : person.id } ) }}">
|
|
{{ 'Create history'|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_history_close', {'person_id' : person.id}) }}">
|
|
{{'Close history'|trans }}
|
|
</a>
|
|
{% else %}
|
|
<a href="{{ path('chill_person_history_open', {'person_id' : person.id} ) }}">
|
|
{{'Open history'|trans }}
|
|
</a>
|
|
{% endif %}
|
|
{% endspaceless %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock personcontent %} |