mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
PersonHistoryFile -> AccompanyingPeriod - refs #275
This commit is contained in:
34
Resources/views/AccompanyingPeriod/form.html.twig
Normal file
34
Resources/views/AccompanyingPeriod/form.html.twig
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "ChillPersonBundle::layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = null %}
|
||||
|
||||
{% block title %}{% endblock title %}
|
||||
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{{ 'Last opening since %last_opening%'|trans(
|
||||
{ '%last_opening%' : accompanying_period.dateOpening|localizeddate('long', 'none', app.request.locale) }) }}
|
||||
|
||||
{% if form.dateClosing is defined %}
|
||||
{{ form_row(form.dateClosing, {'label' : 'Closing date'} ) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.closingMotive is defined %}
|
||||
{{ form_row(form.closingMotive, {'label' : 'Closing motive'} ) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.memo, {'label' : 'Memo' } ) }}
|
||||
|
||||
{{ form_rest(form) }}
|
||||
|
||||
<div class="medium btn danger icon-right entypo icon-lock">
|
||||
<button type="submit">{{ 'Close person accompanying period'|trans }}</button>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
|
||||
{% endblock personcontent %}
|
79
Resources/views/AccompanyingPeriod/list.html.twig
Normal file
79
Resources/views/AccompanyingPeriod/list.html.twig
Normal file
@@ -0,0 +1,79 @@
|
||||
{% 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 %}
|
Reference in New Issue
Block a user