mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
workflows: add freeze mechanism on breadcrumbs, edit document button, and history
This commit is contained in:
@@ -4,26 +4,34 @@
|
||||
{% for step in entity_workflow.stepsChained %}
|
||||
<div class="item-bloc {{ 'bloc' ~ step.id }} {% if loop.first %}initial{% endif %}">
|
||||
<div class="item-row">
|
||||
|
||||
{% if loop.first and step.next is null %}
|
||||
<div class="item-col">
|
||||
{{ 'workflow.No transitions'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="item-col flex-column align-items-end">
|
||||
<div class="decided">
|
||||
{% if not loop.first %}
|
||||
<i class="fa fa-check fa-fw text-success"></i>
|
||||
{% else %}
|
||||
|
||||
<div class="item-col">
|
||||
{% if step.previous is not null and step.previous.freezeAfter == true %}
|
||||
<i class="fa fa-snowflake-o fa-sm me-1" title="{{ 'workflow.Freezed'|trans }}"></i>
|
||||
{% endif %}
|
||||
{{ step.currentStep }}
|
||||
</div>
|
||||
{#
|
||||
<div class="decided">
|
||||
<i class="fa fa-times fa-fw text-danger"></i>
|
||||
Refusé
|
||||
<div class="item-col flex-column align-items-end">
|
||||
<div class="decided">
|
||||
{% if not loop.first %}
|
||||
<i class="fa fa-check fa-fw text-success"></i>
|
||||
{% endif %}
|
||||
{{ step.currentStep }}
|
||||
</div>
|
||||
{#
|
||||
<div class="decided">
|
||||
<i class="fa fa-times fa-fw text-danger"></i>
|
||||
Refusé
|
||||
</div>
|
||||
#}
|
||||
</div>
|
||||
#}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% if step.next is not null %}
|
||||
<div class="item-row separator">
|
||||
|
@@ -11,14 +11,18 @@
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro popoverTitle(step) %}
|
||||
{% if step.previous is not null and step.previous.freezeAfter == true %}
|
||||
<i class="fa fa-snowflake-o fa-sm me-1" title="{{ 'workflow.Freezed'|trans }}"></i>
|
||||
{% endif %}
|
||||
{{ step.currentStep }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro breadcrumb(_ctx) %}
|
||||
<div class="breadcrumb">
|
||||
{% for step in _ctx.entity_workflow.stepsChained %}
|
||||
{% set popTitle = _self.popoverTitle(step) %}
|
||||
{% 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) %}
|
||||
@@ -29,12 +33,15 @@
|
||||
data-bs-toggle="popover"
|
||||
data-bs-placement="bottom"
|
||||
data-bs-custom-class="workflow-transition"
|
||||
title="{{ step.currentStep }}"
|
||||
title="{{ popTitle|e('html_attr') }}"
|
||||
data-bs-content="{{ popContent|e('html_attr') }}"
|
||||
>
|
||||
{% if step.currentStep == 'initial' %}
|
||||
<i class="fa fa-circle me-1 text-chill-yellow"></i>
|
||||
{% endif %}
|
||||
{% if step.previous is not null and step.previous.freezeAfter == true %}
|
||||
<i class="fa fa-snowflake-o fa-sm me-1" title="{{ 'workflow.Freezed'|trans }}"></i>
|
||||
{% endif %}
|
||||
{{ step.currentStep }}
|
||||
</span>
|
||||
{% if not loop.last %}
|
||||
|
@@ -371,6 +371,8 @@ workflow:
|
||||
Transition: Prochaine étape
|
||||
dest for next steps: Utilisateurs qui valideront la prochaine étape
|
||||
Freeze: Geler
|
||||
Freezed: Gelé
|
||||
freezed document: Le document est gelé
|
||||
The associated element will be freezed: L'élément associé sera gelé et ne pourra plus être modifié après cette décision.
|
||||
Finalize: Étape finale
|
||||
The workflow will be finalized: Le suivi est clôturé lors de cette décision.
|
||||
|
Reference in New Issue
Block a user