Ajout filtrage archives par catégorie
This commit is contained in:
parent
4a46099275
commit
cb91f0a624
@ -14,7 +14,7 @@
|
||||
var="options."
|
||||
value=$key
|
||||
label=$name
|
||||
href="?cat_key=%s&prop=1"|args:$key
|
||||
href="?cat_key=%s"|args:$key
|
||||
}}
|
||||
{{/load}}
|
||||
|
||||
@ -31,6 +31,14 @@
|
||||
<p class="help">Inventaire des matériels archivés</p>
|
||||
</div>
|
||||
|
||||
{{* filtrer selon la catégorie *}}
|
||||
{{if $_GET.cat_key == null}}
|
||||
{{:assign condition="1"}}
|
||||
{{else}}
|
||||
{{:assign cat_key=$_GET.cat_key|quote_sql}}
|
||||
{{:assign condition="$$.category == %s"|args:$cat_key}}
|
||||
{{/if}}
|
||||
|
||||
{{* Liste des matériels archivés *}}
|
||||
{{#list
|
||||
select="
|
||||
@ -40,9 +48,10 @@
|
||||
WHERE cat.key = @TABLE.$$.category) AS "Catégorie"
|
||||
"
|
||||
type="equipment"
|
||||
where="$$.status='archived'"
|
||||
where="$$.status='archived' AND %s"|args:$condition
|
||||
order=1
|
||||
}}
|
||||
|
||||
<tr>
|
||||
<td>{{$name}}</td>
|
||||
<td>{{$col2}}</td>
|
||||
@ -58,4 +67,6 @@
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<p class="block alert">Aucun matériel.</p>
|
||||
{{/list}}
|
||||
|
Loading…
Reference in New Issue
Block a user