mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
deal with opening/closing the files
This commit is contained in:
@@ -1 +0,0 @@
|
||||
Hello {{ name }}!
|
31
Resources/views/History/close.html.twig
Normal file
31
Resources/views/History/close.html.twig
Normal 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 %}
|
70
Resources/views/History/list.html.twig
Normal file
70
Resources/views/History/list.html.twig
Normal 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> </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 %}
|
26
Resources/views/History/open.html.twig
Normal file
26
Resources/views/History/open.html.twig
Normal 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 %}
|
@@ -30,7 +30,7 @@ This view should receive those arguments:
|
||||
<dd>{{ person.surname }}</dd>
|
||||
|
||||
<dt class="inline">{{ 'views.Person.view.name'|trans }}</dt>
|
||||
<dd>{{ person.surname }}</dd>
|
||||
<dd>{{ person.name }}</dd>
|
||||
|
||||
<dt class="inline">{{ 'views.Person.view.gender'|trans }}</dt>
|
||||
<dd>{{ ( 'person.gender.' ~ person.genre|default('undefined'))|trans }}</dd>
|
||||
|
@@ -17,7 +17,11 @@
|
||||
<div id="general">
|
||||
<h1>
|
||||
<span class="surname">{{ person.surname }}</span>
|
||||
<span class="personName">{{ person.name }}</span>
|
||||
<span class="personName">{{ person.name }}</span> {% spaceless %}
|
||||
{% if person.isOpen == false %}
|
||||
<i class="icon-lock"></i>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
</h1>
|
||||
|
||||
<p class="date detail">{% transchoice person.genreNumeric
|
||||
|
Reference in New Issue
Block a user