config : mutualisation E/S et correction erreur
This commit is contained in:
parent
0d48d9999c
commit
688c335dd3
59
config.html
59
config.html
@ -11,21 +11,19 @@
|
|||||||
|
|
||||||
{{* lecture config (défaut ou enregistrée) *}}
|
{{* lecture config (défaut ou enregistrée) *}}
|
||||||
{{:include file="./_get_config.html" keep="config"}}
|
{{: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 *}}
|
{{#foreach from=$directions key="direction" item="item"}}
|
||||||
{{#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}}
|
|
||||||
|
|
||||||
{{* types de sorties qui ne peuvent être supprimées *}}
|
{{* types de mouvements qui ne peuvent être supprimés *}}
|
||||||
{{#load type="movement" where="$$.direction='output'" group="$$.output_nature"}}
|
{{#load type="movement" where="$$.direction='%s'"|args:$direction group="$$.operation"}}
|
||||||
{{:assign var="op_label" from="config.output_nature.%s.label"|args:$operation}}
|
{{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}}
|
||||||
{{:assign var="locked_outputs." value=$op_label}}
|
{{:assign var="locked_%ss."|args:$direction value=$op_label}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
|
||||||
<h2>Types d'entrées</h2>
|
<h2>Types {{$item}}</h2>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Libellé</th>
|
<th>Libellé</th>
|
||||||
@ -34,44 +32,23 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#foreach from=$config.input_nature key=key}}
|
{{:assign var="nature" from="config.%s_nature"|args:$direction}}
|
||||||
|
{{#foreach from=$nature key=key}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$label}}</td>
|
<td>{{$label}}</td>
|
||||||
<td>{{$type}}</td>
|
<td>{{$type}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if ! $locked_inputs|has:$label}}
|
{{:assign var="locked" from="locked_%ss"|args:$direction}}
|
||||||
{{:linkbutton label="Supprimer" shape="delete" href="config/supprimer_type_mouvement.html?dir=input&op_key=%s"|args:$key target="_dialog"}}
|
{{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}}
|
{{/if}}
|
||||||
{{:linkbutton label="Modifier" shape="edit" href="config/modifier_type_mouvement.html?dir=input&op_key=%s"|args:$key target="_dialog"}}
|
{{:linkbutton label="Modifier" shape="edit" href="config/modifier_type_mouvement.html?dir=%s&op_key=%s"|args:$direction:$key target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Types de sorties</h2>
|
{{/foreach}}
|
||||||
<table class="list">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Libellé</th>
|
|
||||||
<th>Type</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{{#foreach from=$config.output_nature key=key}}
|
|
||||||
<tr>
|
|
||||||
<td>{{$label}}</td>
|
|
||||||
<td>{{$type}}</td>
|
|
||||||
<td class="actions">
|
|
||||||
{{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"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{/foreach}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
Loading…
Reference in New Issue
Block a user