mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
implementing workflow on tasks
This commit is contained in:
6
Resources/config/services/templating.yml
Normal file
6
Resources/config/services/templating.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
services:
|
||||
Chill\TaskBundle\Templating\TaskTwigExtension:
|
||||
arguments:
|
||||
$taskWorkflowManager: '@Chill\TaskBundle\Workflow\TaskWorkflowManager'
|
||||
tags:
|
||||
- { name: 'twig.extension' }
|
@@ -1,2 +1,6 @@
|
||||
services:
|
||||
Chill\TaskBundle\Workflow\TaskWorkflowManager: ~
|
||||
Chill\TaskBundle\Workflow\TaskWorkflowManager: ~
|
||||
|
||||
Chill\TaskBundle\Workflow\Definition\DefaultTaskDefinition:
|
||||
tags:
|
||||
- { name: 'chill_task.workflow_definition' }
|
@@ -48,7 +48,11 @@
|
||||
<tr>
|
||||
<td>{{ task.title }}</td>
|
||||
<td>{{ task.type }}</td>
|
||||
<td>todo</td>
|
||||
<td>
|
||||
{% for transition in workflow_transitions(task) %}
|
||||
<a href="{{ path('chill_task_task_transition', { 'taskId': task.id, 'transition': transition.name, 'kind': 'single-task', 'return_path': app.request.uri }) }}" style="background-color: {{ task_workflow_metadata(task, 'transition.background-color', transition)|e('html_attr') }}; color: {{ task_workflow_metadata(task, 'transition.text-color', transition)|e('html_attr') }}">{{ task_workflow_metadata(task, 'transition.verb', transition) }}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{% if task.startDate is not null %}{{ task.startDate|localizeddate('medium', 'none') }}{% endif %}</td>
|
||||
<td>{% if task.warningDate is not null %}{{ task.warningDate|localizeddate('medium', 'none') }}{% endif %}</td>
|
||||
<td>{% if task.endDate is not null %}{{ task.endDate|localizeddate('medium', 'none') }}{% endif %}</td>
|
||||
|
Reference in New Issue
Block a user