Passé en {% for place in workflow_marked_places(tache) %} {{ workflow_metadata(tache, 'title', place)|lower ?: ''}}{% endfor %} le {{ tache.validatedat | date("d M Y") }} par {{ tache.validator.firstname | default("n/c") }}
-
1
{% if workflow_has_marked_place(tache, 'draft') or workflow_has_marked_place(tache, 'rejected') %}Brouillon{% else %}Initié{% endif %}
-
2
{% if workflow_has_marked_place(tache, 'pre_running') or workflow_has_marked_place(tache, 'running') or workflow_has_marked_place(tache, 'draft') or workflow_has_marked_place(tache, 'rejected') %}En cours{% else %}Finalisé{% endif%}
-
3
{% if workflow_has_marked_place(tache, 'validation_ok') %}Validé{% else %}Validation{% endif%}
{% set roles = "" %}{% if tache.action.responsable == app.user.people or is_granted('ROLE_ADMIN') %}{% set roler = "responsable" %}{% set roles = "responsableaction" %}{% endif %}
{% set roler = "" %}{% if tache.action.responsable == app.user.people or tache.responsable == app.user.people or is_granted('ROLE_ADMIN') %}{% set roler = "responsable" %}{% endif %}
{% for transition in workflow_transitions(tache) %}
{% if workflow_can(tache, transition.name) %}
{% if workflow_metadata(tache, 'role', transition) in [roles, roler] %}
{{ workflow_metadata(tache, 'title', transition) ?: 'n-a'}}
{% endif %}
{% endif %}
{% else %}
No actions available.
{% endfor %}