back to the list keep the query parameters required by the list

This commit is contained in:
2018-07-05 16:37:59 +02:00
parent 066efdc042
commit 39e166eb5b
8 changed files with 57 additions and 34 deletions

View File

@@ -65,16 +65,16 @@
</li>
{% endif %}
<li>
<a href="{{ path('chill_task_single_task_show', { 'id': task.id }) }}" class="sc-button bt-show "></a>
<a href="{{ path('chill_task_single_task_show', { 'id': task.id, 'list_params': app.request.query.all }) }}" class="sc-button bt-show "></a>
</li>
{% if is_granted('CHILL_TASK_TASK_UPDATE', task) %}
<li>
<a href="{{ path('chill_task_single_task_edit', { 'id': task.id }) }}" class="sc-button bt-update "></a>
<a href="{{ path('chill_task_single_task_edit', { 'id': task.id, 'list_params': app.request.query.all }) }}" class="sc-button bt-update "></a>
</li>
{% endif %}
{% if is_granted('CHILL_TASK_TASK_DELETE', task) %}
<li>
<a href="{{ path('chill_task_single_task_delete', { 'id': task.id } ) }}" class="sc-button bt-delete "></a>
<a href="{{ path('chill_task_single_task_delete', { 'id': task.id, 'list_params': app.request.query.all } ) }}" class="sc-button bt-delete "></a>
</li>
{% endif %}
</ul>

View File

@@ -12,7 +12,7 @@
'title' : 'Remove task'|trans,
'confirm_question' : 'Are you sure you want to remove the task about "%name%" ?'|trans({ '%name%' : person.firstname ~ ' ' ~ person.lastname } ),
'cancel_route' : 'chill_task_singletask_list',
'cancel_parameters' : { 'person_id' : task.person.id, 'id' : task.id },
'cancel_parameters' : app.request.query.get('list_params', { } ),
'form' : delete_form
} ) }}

View File

@@ -41,7 +41,7 @@
</a>
</li>
<li class="cancel">
<a href="{{ path('chill_task_single_task_show', { 'id': task.id } ) }}" class="sc-button">
<a href="{{ path('chill_task_single_task_show', { 'id': task.id, 'list_params': app.request.query.get('list_params', { } )} ) }}" class="sc-button">
{{ 'Cancel'|trans }}
</a>
</li>

View File

@@ -90,7 +90,7 @@
<ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_task_singletask_list', { 'person_id': person.id } ) }}">
<a class="sc-button bt-cancel" href="{{ path('chill_task_singletask_list', app.request.query.get('list_params', {}) ) }}">
{{ 'Back to the list'|trans }}
</a>
</li>