réorganisation (cf remarques Bohwaz)
This commit is contained in:
parent
6006bdd169
commit
0e669a7c21
23 changed files with 279 additions and 236 deletions
|
|
@ -1,34 +1,34 @@
|
|||
{{*
|
||||
Récupérer soit la config enregistrée, soit la config par défaut
|
||||
résultat : config.inputNature et config.outputNature
|
||||
résultat : config.input_nature et config.output_nature
|
||||
*}}
|
||||
|
||||
{{* config par défaut *}}
|
||||
{{:read file="./defaut.json" assign="config_defaut"}}
|
||||
{{:assign config_defaut=$config_defaut|json_decode}}
|
||||
|
||||
{{if $module.config.inputNature != null}}
|
||||
{{:assign var=config.inputNature value=$module.config.inputNature}}
|
||||
{{if $module.config.input_nature != null}}
|
||||
{{:assign var=config.input_nature value=$module.config.input_nature}}
|
||||
{{else}}
|
||||
{{* pas de config enregistrée : utiliser la config par défaut *}}
|
||||
{{#foreach from=$config_defaut.entrées item="elem"}}
|
||||
{{#foreach from=$config_defaut.inputs item="elem"}}
|
||||
{{#foreach from=$elem key=label item=value}}
|
||||
{{:assign var="item.label" value=$label}}
|
||||
{{:assign var="item.type" value=$value}}
|
||||
{{:assign var="config.inputNature." value=$item}}
|
||||
{{:assign var="config.input_nature." value=$item}}
|
||||
{{/foreach}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{{if $module.config.outputNature != null}}
|
||||
{{:assign var=config.outputNature value=$module.config.outputNature}}
|
||||
{{if $module.config.output_nature != null}}
|
||||
{{:assign var=config.output_nature value=$module.config.output_nature}}
|
||||
{{else}}
|
||||
{{* pas de config enregistrée : utiliser la config par défaut *}}
|
||||
{{#foreach from=$config_defaut.sorties item="elem"}}
|
||||
{{#foreach from=$config_defaut.outputs item="elem"}}
|
||||
{{#foreach from=$elem key=label item=value}}
|
||||
{{:assign var="item.label" value=$label}}
|
||||
{{:assign var="item.type" value=$value}}
|
||||
{{:assign var="config.outputNature." value=$item}}
|
||||
{{:assign var="config.output_nature." value=$item}}
|
||||
{{/foreach}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue