{{* -*- brindille -*- *}} {{* Inventaire des matériels en stock dans l'association ou chez les particuliers Paramètres : - cat_key : clé de la catégorie - prop : =1 si matériel propriété de l'association, 0 sinon *}} {{* filtrer selon la catégorie *}} {{if $_GET.cat_key == null}} {{:assign selected_category=null}} {{else}} {{if $_GET.cat_key == -1}} {{:assign selected_category=null}} {{else}} {{:assign selected_category=$_GET.cat_key}} {{/if}} {{/if}} {{* -- Conditions de filtrage *}} {{if $selected_category != null}} {{:assign cat_key=$selected_category|quote_sql}} {{:assign cat_condition="$$.category = %s"|args:$cat_key}} {{else}} {{:assign cat_condition="1"}} {{/if}} {{* filtrer selon appartenance *}} {{if $_GET.prop == null}} {{:assign selected_prop=null}} {{else}} {{if $_GET.prop == -1}} {{:assign selected_prop=null}} {{else}} {{:assign selected_prop=$_GET.prop}} {{/if}} {{/if}} {{if $selected_prop == null}} {{:assign prop_condition="1"}} {{elseif $selected_prop == 1}} {{:assign prop_condition="$$.stock != 0"}} {{else}} {{:assign prop_condition="$$.notowned != 0"}} {{/if}} {{:assign var="prop_options." value="" label="Tous les matériels" href="?prop=-1"}} {{:assign var="prop_options." value="1" label="Matériels propriété de l'association" href="?prop=1"}} {{:assign var="prop_options." value="0" label="Matériels NON propriété de l'association" href="?prop=0"}} {{*:debug propopt=$prop_options selected_prop=$selected_prop*}} {{* sélecteurs de catégories et d'appartenances *}} {{:assign var="cat_options." value="" label="Toutes les catégories" href="?cat_key=-1"}} {{#load module="equipment" type="category" order="$$.name"}} {{:assign var="categories.%s"|args:$key value=$name}} {{:assign var="cat_options." value=$key label=$name href="?cat_key=%s"|args:$key}} {{/load}} {{*:debug cats=$categories selected_category=$selected_category cat_key=$cat_key cat_condition=$cat_condition *}} {{*
Inventaire des matériels présents dans l'association
Aucun matériel.
{{/list}} {{* *}}