From 688c335dd3bda557b25121029783ebcdb423628d Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 25 Feb 2025 12:20:58 +0100 Subject: [PATCH] config : mutualisation E/S et correction erreur --- config.html | 89 ++++++++++++++++++++--------------------------------- 1 file changed, 33 insertions(+), 56 deletions(-) diff --git a/config.html b/config.html index b5d5411..db40574 100644 --- a/config.html +++ b/config.html @@ -11,67 +11,44 @@ {{* lecture config (défaut ou enregistrée) *}} {{:include file="./_get_config.html" keep="config"}} +{{:assign var="directions.input" value="d'entrées"}} +{{:assign var="directions.output" value="de sorties"}} -{{* types d'entrées qui ne peuvent être supprimées *}} -{{#load type="movement" where="$$.direction='input'" group="$$.operation"}} - {{:assign var="op_label" from="config.input_nature.%s.label"|args:$operation}} - {{:assign var="locked_inputs." value=$op_label}} -{{/load}} +{{#foreach from=$directions key="direction" item="item"}} -{{* types de sorties qui ne peuvent être supprimées *}} -{{#load type="movement" where="$$.direction='output'" group="$$.output_nature"}} - {{:assign var="op_label" from="config.output_nature.%s.label"|args:$operation}} - {{:assign var="locked_outputs." value=$op_label}} -{{/load}} + {{* types de mouvements qui ne peuvent être supprimés *}} + {{#load type="movement" where="$$.direction='%s'"|args:$direction group="$$.operation"}} + {{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}} + {{:assign var="locked_%ss."|args:$direction value=$op_label}} + {{/load}} -

Types d'entrées

- - - - - - - - - - {{#foreach from=$config.input_nature key=key}} +

Types {{$item}}

+
LibelléType
+ - - - + + + - {{/foreach}} - -
{{$label}}{{$type}} - {{if ! $locked_inputs|has:$label}} - {{:linkbutton label="Supprimer" shape="delete" href="config/supprimer_type_mouvement.html?dir=input&op_key=%s"|args:$key target="_dialog"}} - {{/if}} - {{:linkbutton label="Modifier" shape="edit" href="config/modifier_type_mouvement.html?dir=input&op_key=%s"|args:$key target="_dialog"}} - LibelléType
+ + + {{:assign var="nature" from="config.%s_nature"|args:$direction}} + {{#foreach from=$nature key=key}} + + {{$label}} + {{$type}} + + {{:assign var="locked" from="locked_%ss"|args:$direction}} + {{if ! $locked|has:$label}} + {{:linkbutton label="Supprimer" shape="delete" href="config/supprimer_type_mouvement.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}} + {{/if}} + {{:linkbutton label="Modifier" shape="edit" href="config/modifier_type_mouvement.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}} + + + {{/foreach}} + + -

Types de sorties

- - - - - - - - - - {{#foreach from=$config.output_nature key=key}} - - - - - - {{/foreach}} - -
LibelléType
{{$label}}{{$type}} - {{if ! $locked_outputs|has:$label}} - {{:linkbutton label="Supprimer" shape="delete" href="config/supprimer_type_mouvement.html?dir=output&op_key=%s"|args:$key target="_dialog"}} - {{/if}} - {{:linkbutton label="Modifier" shape="edit" href="config/modifier_type_mouvement.html?dir=output&op_key=%s"|args:$key target="_dialog"}} -
+{{/foreach}} {{:admin_footer}}