Mutualisation suppression mouvement
This commit is contained in:
parent
db36bce5fa
commit
e3b33231a7
3 changed files with 110 additions and 8 deletions
|
|
@ -5,18 +5,68 @@
|
|||
{{:include file="/%s/_nav.html"|args:$module.name current="entrees"}}
|
||||
|
||||
{{if $_GET.ok}}
|
||||
<p class="block confirm">Entrée enregistrée.</p>
|
||||
<p class="block confirm">{{$_GET.msg}}</p>
|
||||
{{/if}}
|
||||
|
||||
<form method="post" action="">
|
||||
<fieldset class="entree">
|
||||
<legend>Ajouter une entrée pour du </legend>
|
||||
{{:linkbutton label="Matériel répertorié" shape="plus" href="repertorie.html"}}
|
||||
{{:linkbutton label="Matériel non répertorié" shape="plus" href="non_repertorie.html}}
|
||||
{{:linkbutton label="Matériel répertorié" shape="plus" href="repertorie.html" target="_dialog"}}
|
||||
{{:linkbutton label="Matériel non répertorié" shape="plus" href="non_repertorie.html" target="_dialog"}}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{{* lister les entrées *}}
|
||||
<section class="liste_entrees">
|
||||
<h2>Liste des entrées avec la section #list</h2>
|
||||
|
||||
{{* MARCHE PAS (voir message de Bohwaz)
|
||||
{{#list
|
||||
select="
|
||||
$$.date AS 'Date' ;
|
||||
$$.inputNature AS 'Type' ;
|
||||
$$.amount AS 'Nombre' ;
|
||||
(SELECT $$.designation
|
||||
FROM @TABLE AS b
|
||||
WHERE b.$$.equipment = @TABLE.$$.equipment)
|
||||
AS 'Matériel' ;
|
||||
$$.comment AS 'Remarques'"
|
||||
type="movement"
|
||||
direction="entrée"
|
||||
order=1}}
|
||||
*}}
|
||||
|
||||
{{#list select="$$.date AS 'Date' ; $$.inputNature AS 'Type' ; $$.amount AS 'Nombre' ; '' AS 'Matériel' ; $$.comment AS 'Remarques'" type="movement" direction="entrée" order=1}}
|
||||
{{:assign var='mvt_key' value=$key}}
|
||||
{{#load type="equipment" key=$equipment assign="equipment"}}
|
||||
<tr>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$inputNature}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$designation}}</td>
|
||||
<td>{{$comment}}</td>
|
||||
<td class="actions">
|
||||
{{*
|
||||
{{:linkbutton label="Supprimer" href="delete_entree.html?key=%s"|args:$mvt_key shape="delete" target="_dialog"}}
|
||||
*}}
|
||||
{{:linkbutton
|
||||
label="Supprimer"
|
||||
href="../delete_movement.html?key=%s&mvt=entrée&caller=%s"|args:$mvt_key:$request_url
|
||||
shape="delete"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/load}}
|
||||
{{/list}}
|
||||
</section>
|
||||
|
||||
{{*
|
||||
Remarque :
|
||||
- le tri par matériel ne fonctionne pas, car j'ai dû tricher pour afficher cette colonne
|
||||
*}}
|
||||
|
||||
<section class="liste_entrees">
|
||||
<h2>Liste des entrées avec la section #load</h2>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -29,21 +79,22 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#load type="movement" direction="entrée" assign="entrees"}}
|
||||
{{#load type="movement" direction="entrée" order="$$.date" assign="entrees"}}
|
||||
{{#load type="equipment" key=$entrees.equipment assign="equipment"}}
|
||||
<tr>
|
||||
<td>{{$entrees.date}}</td>
|
||||
<td>{{$entrees.date|date_short}}</td>
|
||||
<td>{{$entrees.inputNature}}</td>
|
||||
<td>{{$entrees.amount}}</td>
|
||||
<td>{{$designation}}</td>
|
||||
<td>{{$entrees.comment}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Supprimer" href="delete.html?id=%s"|args:$key shape="delete" target="_dialog"}}
|
||||
{{:linkbutton label="Supprimer" href="delete_entree.html?key=%s"|args:$key shape="delete" target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/load}}
|
||||
{{/load}}
|
||||
</tbody>
|
||||
{{/load}}
|
||||
</table>
|
||||
</section>
|
||||
|
||||
{{:admin_footer}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue