mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
add a timeline in view pages for viewing task transitions
This commit is contained in:
@@ -5,4 +5,9 @@ services:
|
||||
$registry: '@Symfony\Component\Workflow\Registry'
|
||||
tags:
|
||||
- { name: 'chill.timeline', context: 'person' }
|
||||
|
||||
Chill\TaskBundle\Timeline\SingleTaskTaskLifeCycleEventTimelineProvider:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$registry: '@Symfony\Component\Workflow\Registry'
|
||||
tags:
|
||||
- { name: 'chill.timeline', context: 'task' }
|
||||
|
@@ -81,6 +81,11 @@
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
{% if timeline is not null %}
|
||||
<h3>{{"Timeline"|trans}}</h3>
|
||||
{{ timeline|raw }}
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ path('chill_task_singletask_list', { 'person_id': person.id } ) }}">
|
||||
@@ -114,5 +119,4 @@
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -0,0 +1,13 @@
|
||||
<div>
|
||||
<h3 class="single-line">
|
||||
{{ event.datetime|localizeddate('long', 'short') }}
|
||||
<span class="task"> / {{ 'Task'|trans }}</span> /
|
||||
{% if transition is not null %}
|
||||
<span class="statement">{{ task_workflow_metadata(event.task, 'transition.sentence', transition)|trans({ '%user%': event.author.username }) }}</span>
|
||||
<span>"{{ event.task.title }}"</span>
|
||||
{% else %}
|
||||
<span class="statement">{{ '%user% has created the task'|trans({ '%user%': event.author.username }) }}</span>
|
||||
<span>"{{ event.task.title }}"</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
</div>
|
Reference in New Issue
Block a user