improve filter form

- hide form in some places ;
- i18n
- hide status filtering with a parameter (redundant)
This commit is contained in:
2018-05-08 22:56:45 +02:00
parent 650f2c8e18
commit 69eb9648c9
8 changed files with 103 additions and 32 deletions

View File

@@ -6,7 +6,7 @@
<thead>
<tr>
<th class="chill-red">{{ 'Title'|trans }}</th>
<th class="chill-green">{{ 'Task type'|trans }}</th>
{# <th class="chill-green">{{ 'Task type'|trans }}</th> #}
{% if person is null %}
<th>{{ 'Person'|trans }}</th>
{% endif %}
@@ -18,7 +18,7 @@
{% for task in tasks %}
<tr>
<td>{{ task.title }}</td>
<td>{{ task.type }}</td>
{# <td>{{ task.type }}</td> #}
{% if person is null %}
<td><a href="{{ path('chill_person_view', {person_id : task.person.Id}) }}">{{ task.person}}</a></td>
{% endif %}
@@ -141,16 +141,26 @@
<h1>{{ 'Task list'|trans }}</h1>
<p>Filter the tasks</p>
{% if false == app.request.query.boolean('hide_form', false) %}
<h3>{{ 'Filter the tasks'|trans }}</h3>
{{ form_start(form) }}
{{ form_row(form.user_id) }}
{% if form.status is defined %}
{{ form_row(form.status) }}
{% endif %}
{% if form.person_id is defined %}
{{ form_row(form.person_id) }}
{% endif %}
<button type="submit">{{ 'Filter'|trans }}</button>
<ul class="record_actions">
<li>
<button type="submit" class="sc-button">{{ 'Filter'|trans }}</button>
</li>
</ul>
{{ form_end(form)}}
{% endif %}