{{ 'Decision'|trans }}

{% if transition_form is not null %} {{ form_start(transition_form) }} {{ form_errors(transition_form) }} {% set step = entity_workflow.currentStepChained %} {% set labels = workflow_metadata(entity_workflow, 'label', step.currentStep) %} {% set label = labels is null ? step.currentStep : labels|localize_translatable_string %}
{{ 'workflow.Current step'|trans }} : {{ label }}
{% if step.previous is not null %} {% if step.previous.comment is not empty %}
{{ step.previous.comment|chill_markdown_to_html }}
{% endif %}
{{ 'By'|trans }} {{ step.previous.transitionBy|chill_entity_render_box }}, {{ step.previous.transitionAt|format_datetime('short', 'short') }}
{% else %}
{{ 'workflow.Created by'|trans }}
{{ step.entityWorkflow.createdBy|chill_entity_render_box }}
{{ 'Le'|trans }}
{{ step.entityWorkflow.createdAt|format_datetime('short', 'short') }}
{% endif %}
{% if transition_form.transitionFilter is defined %} {{ form_row(transition_form.transitionFilter) }} {% endif %}
{{ form_row(transition_form.transition) }}
{% if transition_form.freezeAfter is defined %} {{ form_row(transition_form.freezeAfter) }} {% endif %}
{{ form_row(transition_form.future_dest_users) }} {{ form_row(transition_form.future_dest_emails) }}

{{ form_label(transition_form.comment) }}

{{ form_widget(transition_form.comment) }} {{ form_end(transition_form) }} {% else %}
{% if entity_workflow.currentStep.isFinal %}

{{ 'workflow.This workflow is finalized'|trans }}

{% else %}

{{ 'workflow.You are not allowed to apply a transition on this workflow'|trans }}

{% if entity_workflow.currentStep.destUser|length > 0 %}

{{ 'workflow.Only those users are allowed'|trans }} :

{% endif %} {% if entity_workflow.currentStep.destUserByAccessKey|length > 0 %}

{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :

{% endif %} {% endif %}
{% endif %}