mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
46 lines
1.6 KiB
Twig
46 lines
1.6 KiB
Twig
{% macro popoverContent(step) %}
|
|
<ul class="small_in_title">
|
|
<li>
|
|
<span class="item-key">{{ 'By'|trans ~ ' : ' }}</span>
|
|
<b>{{ step.transitionBy|chill_entity_render_box }}</b>
|
|
</li>
|
|
<li>
|
|
<span class="item-key">{{ 'Le'|trans ~ ' : ' }}</span>
|
|
<b>{{ step.transitionAt|format_datetime('short', 'short') }}</b>
|
|
</li>
|
|
</ul>
|
|
{% endmacro %}
|
|
|
|
{% macro breadcrumb(_ctx) %}
|
|
<div class="breadcrumb">
|
|
{% for step in _ctx.entity_workflow.stepsChained %}
|
|
{% if step.previous is null %}
|
|
{#
|
|
{% set popContent = "Point de départ du workflow" %}
|
|
{{ dump(step) }}
|
|
#}
|
|
{% set popContent = _self.popoverContent(step) %}
|
|
{% else %}
|
|
{% set popContent = _self.popoverContent(step.previous) %}
|
|
{% endif %}
|
|
<span class="mx-2"
|
|
tabindex="0"
|
|
data-bs-trigger="focus hover"
|
|
data-bs-toggle="popover"
|
|
data-bs-placement="bottom"
|
|
data-bs-custom-class="workflow-transition"
|
|
title="{{ step.currentStep }}"
|
|
data-bs-content="{{ popContent|e('html_attr') }}"
|
|
>
|
|
{% if step.currentStep == 'initial' %}
|
|
<i class="fa fa-circle me-1 text-chill-yellow"></i>
|
|
{% endif %}
|
|
{{ step.currentStep }}
|
|
</span>
|
|
{% if not loop.last %}
|
|
→
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endmacro %}
|