mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
templates added for transition of course task and taskcontroller adapted to show correct template
This commit is contained in:
parent
5d69e48787
commit
cc258ba164
@ -64,7 +64,7 @@ class TaskController extends AbstractController
|
||||
'id' => $task->getId(),
|
||||
'list_params' => $request->query->get('list_params', [])
|
||||
]);
|
||||
$defaultTemplate = '@ChillTask/SingleTask/transition.html.twig';
|
||||
$task->getCourse() === null ? $defaultTemplate = '@ChillTask/SingleTask/transition.html.twig' : $defaultTemplate = '@ChillTask/SingleTask/transitionCourseTask.html.twig';
|
||||
break;
|
||||
default:
|
||||
return new Response("The type '$kind' is not implemented",
|
||||
|
@ -0,0 +1,23 @@
|
||||
<h2>{{ 'Apply transition on task <em>%title%</em>'|trans({ '%title%': task.title } )|raw }}</h2>
|
||||
|
||||
|
||||
{% if task_workflow_metadata(task, 'transition.sentence_confirmation', transition) is not empty %}
|
||||
<p class="message-confirm">{{ task_workflow_metadata(task, 'transition.sentence_confirmation', transition)|trans }}</p>
|
||||
{% else %}
|
||||
<p>{{ 'Are you sure to apply the transition %name% on this task ?'|trans({ '%name%': task_workflow_metadata(task, 'transition.name', transition)|default(transition.name)|trans }) }}</p>
|
||||
{% endif %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_task_singletask_list', app.request.query.get('list_params', { }) ) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class' : "btn btn-task-exchange green" }, 'label': task_workflow_metadata(task, 'transition.apply_transition_submit_label', transition)|default('apply')|trans } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
@ -7,28 +7,6 @@
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
<h2>{{ 'Apply transition on task <em>%title%</em>'|trans({ '%title%': task.title } )|raw }}</h2>
|
||||
|
||||
|
||||
{% if task_workflow_metadata(task, 'transition.sentence_confirmation', transition) is not empty %}
|
||||
<p class="message-confirm">{{ task_workflow_metadata(task, 'transition.sentence_confirmation', transition)|trans }}</p>
|
||||
{% else %}
|
||||
<p>{{ 'Are you sure to apply the transition %name% on this task ?'|trans({ '%name%': task_workflow_metadata(task, 'transition.name', transition)|default(transition.name)|trans }) }}</p>
|
||||
{% endif %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_task_singletask_list', app.request.query.get('list_params', { }) ) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class' : "btn btn-task-exchange green" }, 'label': task_workflow_metadata(task, 'transition.apply_transition_submit_label', transition)|default('apply')|trans } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% include '@ChillTask/SingleTask/_transition.html.twig' %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -0,0 +1,12 @@
|
||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_task_task_list' %}
|
||||
{% set accompanyingCourse = task.course %}
|
||||
|
||||
{% block title 'Remove task'|trans %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@ChillTask/SingleTask/_transition.html.twig' %}
|
||||
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user