diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue index de645f899..943ea85f3 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue @@ -102,11 +102,17 @@ export default { }, getPopContent(step) { if (step.transitionPrevious != null) { - return `` - ; + if (step.transitionPreviousBy !== null) { + return `` + ; + } else { + return `` + } } }, formatDate(datetime) { diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig index ac85525a6..4f43c4dad 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig @@ -6,7 +6,7 @@ {{ form_errors(transition_form) }} {% set step = entity_workflow.currentStepChained %} - {% set labels = workflow_metadata(entity_workflow, 'label', step.currentStep) %} + {% set labels = workflow_metadata(entity_workflow, 'label', step.currentStep, entity_workflow.workflowName) %} {% set label = labels is null ? step.currentStep : labels|localize_translatable_string %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig index cfe8b83f5..f6d49f7d6 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_extension_list_workflow_for.html.twig @@ -1,8 +1,5 @@ -{% set acl = "0" %} -{% if is_granted('CHILL_MAIN_WORKFLOW_CREATE', blank_workflow) %} - {% set acl = "1" %} -{% endif %} - +{% set acl = "1" %} +{# note: the list of available workflows already check that it is possible to create a given workflow #} {# vue component #}
{% for step in entity_workflow.stepsChained %} - {% set place_labels = workflow_metadata(entity_workflow, 'label', step.currentStep) %} + {% set place_labels = workflow_metadata(entity_workflow, 'label', step.currentStep, entity_workflow.workflowName) %} {% set place_label = place_labels is null ? step.currentStep : place_labels|localize_translatable_string %}
@@ -35,9 +35,9 @@
{% if step.next is not null %} {% set transition = chill_workflow_transition_by_string(step.entityWorkflow, step.transitionAfter) %} - {% set transition_labels = workflow_metadata(step.entityWorkflow, 'label', transition) %} + {% set transition_labels = workflow_metadata(step.entityWorkflow, 'label', transition, step.entityWorkflow.workflowName) %} {% set transition_label = transition_labels is null ? step.transitionAfter : transition_labels|localize_translatable_string %} - {% set forward = workflow_metadata(step.entityWorkflow, 'isForward', transition) %} + {% set forward = workflow_metadata(step.entityWorkflow, 'isForward', transition, step.entityWorkflow.workflowName) %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig index e3087769f..61189100c 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig @@ -44,7 +44,7 @@ {% endif %} {% if step.previous is not null %} {% set transition = chill_workflow_transition_by_string(step.entityWorkflow, step.previous.transitionAfter) %} - {% set labels = workflow_metadata(step.entityWorkflow, 'label', transition) %} + {% set labels = workflow_metadata(step.entityWorkflow, 'label', transition, step.entityWorkflow.workflowName) %} {% set label = labels is null ? step.previous.transitionAfter : labels|localize_translatable_string %} {{ label }} {% endif %} @@ -53,7 +53,7 @@ {% macro breadcrumb(_ctx) %}