Commit c52cf144 authored by Julien Fastré's avatar Julien Fastré

add return path for page show and edit for single task

parent c6a4e615
Pipeline #130811 passed with stage
in 16 seconds
......@@ -30,3 +30,7 @@ Version 1.5.7
- fix error when showing task list without person in context (issue #3) ;
Version 1.5.8
=============
- add returnPath to page Show and List for Single tasks ;
......@@ -36,13 +36,12 @@
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_task_singletask_list', { 'person_id': person.id } ) }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li class="cancel">
<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 class="sc-button bt-cancel" href="{% if app.request.query.has('returnPath') %}
{{ app.request.query.get('returnPath')|escape('html_attr') }}
{% else %}
{{ path('chill_task_single_task_show', { 'id': task.id, 'list_params': app.request.query.get('list_params', { } )} ) }}" class="sc-button">
{% endif %}
{{ app.request.query.get('returnLabel')|default('Cancel'|trans) }}
</a>
</li>
<li>
......
......@@ -85,8 +85,12 @@
<ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_task_singletask_list', app.request.query.get('list_params', {}) ) }}">
{{ 'Back to the list'|trans }}
<a class="sc-button bt-cancel" href="{%- if app.request.query.has('returnPath') -%}
{{ app.request.query.get('returnPath')|escape('html_attr') }}
{%- else -%}
{{ path('chill_task_singletask_list', app.request.query.get('list_params', {}) ) }}
{%- endif -%}">
{{ app.request.query.get('returnLabel')|default('Back to the list'|trans) }}
</a>
</li>
{% if workflow_transitions(task)|length > 0 %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment