Listage des mouvements avec #list
This commit is contained in:
parent
fe100333ff
commit
d72165132b
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
<p class="block confirm">{{$_GET.msg}}</p>
|
<p class="block confirm">{{$_GET.msg}}</p>
|
||||||
{{else}}
|
|
||||||
<p class="block alert">{{$_GET.msg}}</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
@ -20,9 +18,8 @@
|
|||||||
|
|
||||||
{{* lister les entrées *}}
|
{{* lister les entrées *}}
|
||||||
<section class="liste_entrees">
|
<section class="liste_entrees">
|
||||||
<h2>Liste des entrées avec la section #list</h2>
|
<h2>Liste des entrées</h2>
|
||||||
|
|
||||||
{{* MARCHE PAS (voir message de Bohwaz)
|
|
||||||
{{#list
|
{{#list
|
||||||
select="
|
select="
|
||||||
$$.date AS 'Date' ;
|
$$.date AS 'Date' ;
|
||||||
@ -30,22 +27,19 @@
|
|||||||
$$.amount AS 'Nombre' ;
|
$$.amount AS 'Nombre' ;
|
||||||
(SELECT $$.designation
|
(SELECT $$.designation
|
||||||
FROM @TABLE AS b
|
FROM @TABLE AS b
|
||||||
WHERE b.$$.equipment = @TABLE.$$.equipment)
|
WHERE b.key = @TABLE.$$.equipment)
|
||||||
AS 'Matériel' ;
|
AS 'Matériel' ;
|
||||||
$$.comment AS 'Remarques'"
|
$$.comment AS 'Remarques'"
|
||||||
type="movement"
|
type="movement"
|
||||||
direction="entrée"
|
direction="entrée"
|
||||||
order=1}}
|
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}}
|
{{:assign var='mvt_key' value=$key}}
|
||||||
{{#load type="equipment" key=$equipment assign="equipment"}}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$date|date_short}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
<td>{{$inputNature}}</td>
|
<td>{{$inputNature}}</td>
|
||||||
<td>{{$amount}}</td>
|
<td>{{$amount}}</td>
|
||||||
<td>{{$designation}}</td>
|
<td>{{$col4}}</td>
|
||||||
<td>{{$comment}}</td>
|
<td>{{$comment}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{*
|
{{*
|
||||||
@ -58,45 +52,7 @@
|
|||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/load}}
|
|
||||||
{{/list}}
|
{{/list}}
|
||||||
</section>
|
</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>
|
|
||||||
<th>Date</th>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Nombre</th>
|
|
||||||
<th>Matériel</th>
|
|
||||||
<th>Remarques</th>
|
|
||||||
<th>Action(s)</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{{#load type="movement" direction="entrée" order="$$.date" assign="entrees"}}
|
|
||||||
{{#load type="equipment" key=$entrees.equipment assign="equipment"}}
|
|
||||||
<tr>
|
|
||||||
<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_entree.html?key=%s"|args:$key shape="delete" target="_dialog"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{/load}}
|
|
||||||
</tbody>
|
|
||||||
{{/load}}
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
@ -19,14 +19,27 @@
|
|||||||
{{* lister les sorties *}}
|
{{* lister les sorties *}}
|
||||||
<section class="liste_sorties">
|
<section class="liste_sorties">
|
||||||
<h2>Liste des sorties</h2>
|
<h2>Liste des sorties</h2>
|
||||||
{{#list select="$$.date AS 'Date' ; $$.outputNature AS 'Type' ; $$.amount AS 'Nombre' ; "" AS 'Matériel' ; $$.comment AS 'Remarques'" type="movement" direction="sortie" order=1}}
|
|
||||||
|
{{#list
|
||||||
|
select="
|
||||||
|
$$.date AS 'Date' ;
|
||||||
|
$$.outputNature AS 'Type' ;
|
||||||
|
$$.amount AS 'Nombre' ;
|
||||||
|
(SELECT $$.designation
|
||||||
|
FROM @TABLE AS b
|
||||||
|
WHERE b.key = @TABLE.$$.equipment)
|
||||||
|
AS 'Matériel' ;
|
||||||
|
$$.comment AS 'Remarques'"
|
||||||
|
type="movement"
|
||||||
|
direction="sortie"
|
||||||
|
order=1}}
|
||||||
|
|
||||||
{{:assign var='mvt_key' value=$key}}
|
{{:assign var='mvt_key' value=$key}}
|
||||||
{{#load type="equipment" key=$equipment assign="equipment"}}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$date|date_short}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
<td>{{$outputNature}}</td>
|
<td>{{$outputNature}}</td>
|
||||||
<td>{{$amount}}</td>
|
<td>{{$amount}}</td>
|
||||||
<td>{{$designation}}</td>
|
<td>{{$col4}}</td>
|
||||||
<td>{{$comment}}</td>
|
<td>{{$comment}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{*
|
{{*
|
||||||
@ -37,10 +50,8 @@
|
|||||||
href="../delete_movement.html?key=%s&mvt=sortie&caller=%s"|args:$mvt_key:$request_url
|
href="../delete_movement.html?key=%s&mvt=sortie&caller=%s"|args:$mvt_key:$request_url
|
||||||
shape="delete"
|
shape="delete"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/load}}
|
|
||||||
{{/list}}
|
{{/list}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user