add a timeline in view pages for viewing task transitions

This commit is contained in:
nobohan
2018-05-21 13:27:30 +02:00
parent f829dccbdd
commit d4d730ea02
5 changed files with 170 additions and 12 deletions

View File

@@ -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 %}

View File

@@ -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>