deal with opening/closing the files

This commit is contained in:
2013-11-26 23:00:30 +01:00
parent e390c891d8
commit 377a69d26f
20 changed files with 1262 additions and 22 deletions

View File

@@ -0,0 +1,31 @@
{% extends "CLChillPersonBundle::layout.html.twig" %}
{% set activeRouteKey = null %}
{% block title %}{% endblock title %}
{% form_theme form 'CLChillMainBundle:Form:fields.html.twig' %}
{% block personcontent %}
{{ form_start(form) }}
{{ 'views.Person.close.last_opening_since'|trans(
{ '%last_opening%' : history.dateOpening|date(date_format) }) }}
{{ form_row(form.dateClosing, {'label' : 'views.Person.close.date_of_closing'} ) }}
{{ form_row(form.motive, {'label' : 'views.Person.close.motive_of_closing'} ) }}
{{ form_row(form.texto, {'label' : 'views.Person.close.texto' } ) }}
{{ form_rest(form) }}
<div class="medium btn danger icon-right entypo icon-lock">
<button type="submit">{{ 'views.Person.close.action'|trans }}</button>
</div>
{{ form_end(form) }}
{% endblock personcontent %}

View File

@@ -0,0 +1,70 @@
{% extends "CLChillPersonBundle::layout.html.twig" %}
{% set activeRouteKey = 'chill_person_history_list' %}
{% block title %}{{ 'views.Person.hlist.title'|trans({ '%name%' : person.__toString}) }}{% endblock title %}
{% block personcontent %}
<table class="striped rounded">
<thead>
<tr>
<th>{{ 'views.Person.hlist.dateOpening_title'|trans }}</th>
<th>{{ 'views.Person.hlist.dateClosing_title'|trans }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for history in histories %}
<tr>
<td>{{ history.dateOpening|date(date_format) }}</td>
<td>{% spaceless %}
{% if history.isOpen %}
{{ 'views.Person.hlist.still_open'|trans }}
{% else %}
{{ history.dateClosing|date(date_format) }}
{% endif %}
{% endspaceless %}</td>
<td>
<div class="small warning btn icon-right entypo icon-pencil"><a href="{{ path('chill_person_history_update', {'id' : person.id, 'historyId' : history.id } ) }}">{{ 'views.Person.hlist.edit'|trans }}</a></div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="form_control">
<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', {'id' : person.id}) }}">
{{'views.Person.hlist.close'|trans }}
</a>
{% else %}
<a href="{{ path('chill_person_history_open', {'id' : person.id} ) }}">
{{'views.Person.hlist.open'|trans }}
</a>
{% endif %}
{% endspaceless %}
</div>
</div>
</div>
{% endblock personcontent %}

View File

@@ -0,0 +1,26 @@
{% extends "CLChillPersonBundle::layout.html.twig" %}
{% set activeRouteKey = null %}
{% block title %}{% endblock title %}
{% form_theme form 'CLChillMainBundle:Form:fields.html.twig' %}
{% block personcontent %}
{{ form_start(form) }}
{{ form_row(form.dateOpening, {'label' : 'views.Person.open.date_of_opening'} ) }}
{{ form_row(form.texto, {'label' : 'views.Person.open.texto' } ) }}
{{ form_rest(form) }}
<div class="medium btn danger icon-right entypo icon-lock">
<button type="submit">{{ 'views.Person.open.action'|trans }}</button>
</div>
{{ form_end(form) }}
{% endblock personcontent %}