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 ...@@ -30,3 +30,7 @@ Version 1.5.7
- fix error when showing task list without person in context (issue #3) ; - 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 @@ ...@@ -36,13 +36,12 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <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="{% if app.request.query.has('returnPath') %}
{{ 'Back to the list'|trans }} {{ app.request.query.get('returnPath')|escape('html_attr') }}
</a> {% else %}
</li> {{ path('chill_task_single_task_show', { 'id': task.id, 'list_params': app.request.query.get('list_params', { } )} ) }}" class="sc-button">
<li class="cancel"> {% endif %}
<a href="{{ path('chill_task_single_task_show', { 'id': task.id, 'list_params': app.request.query.get('list_params', { } )} ) }}" class="sc-button"> {{ app.request.query.get('returnLabel')|default('Cancel'|trans) }}
{{ 'Cancel'|trans }}
</a> </a>
</li> </li>
<li> <li>
......
...@@ -85,8 +85,12 @@ ...@@ -85,8 +85,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_task_singletask_list', app.request.query.get('list_params', {}) ) }}"> <a class="sc-button bt-cancel" href="{%- if app.request.query.has('returnPath') -%}
{{ 'Back to the list'|trans }} {{ 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> </a>
</li> </li>
{% if workflow_transitions(task)|length > 0 %} {% 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