From f750cfecac97906664ad554bcd6b4ef75efdb23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 24 Oct 2024 16:15:49 +0200 Subject: [PATCH] Show userGroup in workflow breadcrumb related: - https://champs-libres.openproject.com/wp/774 - OP#774 - https://gitea.champs-libres.be/Vendee/accent-suivi-developpement/issues/1274 --- .../Resources/views/Workflow/_history.html.twig | 6 +++--- .../Resources/views/Workflow/macro_breadcrumb.html.twig | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig index 5fcc60ed4..9149e9a94 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig @@ -42,7 +42,7 @@
{%- if step.transitionBy is not null -%} - {{ step.transitionBy|chill_entity_render_box({'at_date': step.transitionAt}) }} + {{ step.transitionBy|chill_entity_render_box({'at_date': step.transitionAt}) }} {% else %} {{ 'workflow.Automated transition'|trans }} {%- endif -%} @@ -105,7 +105,7 @@

{{ 'workflow.Users put in Cc'|trans }} :

    {% for u in step.ccUser %} -
  • {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
  • +
  • {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
  • {% endfor %}
{% endif %} @@ -123,7 +123,7 @@

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

    {% for u in step.destUserByAccessKey %} -
  • {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
  • +
  • {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
  • {% endfor %}
{% endif %} 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 61189100c..6a1c66ae7 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig @@ -9,11 +9,13 @@ {{ 'Le'|trans ~ ' : ' }} {{ step.previous.transitionAt|format_datetime('short', 'short') }} - {% if step.destUser|length > 0 %} + {% if step.destUser|length > 0 or step.destUserGroups|length > 0 %}
  • {{ 'workflow.For'|trans ~ ' : ' }} - {% for d in step.destUser %}{{ d|chill_entity_render_string({'at_date': step.previous.transitionAt}) }}{% if not loop.last %}, {% endif %}{% endfor %} + {% for d in step.destUser %}{{ d|chill_entity_render_string({'at_date': step.previous.transitionAt}) }}{% if not loop.last %}, {% endif -%}{% endfor -%} + {%- if step.destUser|length > 0 and step.destUserGroups|length > 0 %}, {% endif -%} + {%- for d in step.destUserGroups %}{{ d|chill_entity_render_box }}{% if not loop.last %}, {% endif %}{% endfor -%}
  • {% endif %}