From 1961431942981875ff147a39df0701cafa80566a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 16 Mar 2026 10:42:09 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20pr=C3=A9sentation=20et=20na?= =?UTF-8?q?vigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _inventory.html | 18 ++-------- _nav.html | 54 +++++++++++++++-------------- archives.html | 4 +-- default.json | 9 ++++- equipment_history.html | 58 +++++++++++++------------------- index.html | 6 ++-- loan_history.html | 4 --- loan_movements.html | 4 --- member_loan.html | 16 +++++---- movements/add_new_equipment.html | 2 +- movements/copy_movement.html | 2 +- movements/input_equipment.html | 2 +- movements/modify_movement.html | 2 +- movements/output_return.html | 2 +- snippets/_details.html | 4 +-- 15 files changed, 84 insertions(+), 103 deletions(-) diff --git a/_inventory.html b/_inventory.html index 213bcc9..ce8cffc 100644 --- a/_inventory.html +++ b/_inventory.html @@ -112,7 +112,7 @@ {{else}} {{:assign prop="&prop=%s"|args:$selected_prop}} {{/if}} - {{:link href="equipment_history.html?key=%s&prop=%s"|args:$key:$selected_prop" label=$name}} + {{:link href="equipment_history.html?key=%s&prop=%s"|args:$key:$selected_prop label=$name}} {{$cat_name}} {{$stock}} {{$col4}} @@ -120,22 +120,8 @@ {{$out}} {{$col7}} -{{* - {{if $col7 > 0}} - {{:linkbutton - label="Sortie" - shape="minus" - href="movements/output_equipment.html?key=%s"|args:$key - target="_dialog"}} - {{/if}} - {{:linkbutton - label="Entrée" - shape="plus" - href="movements/input_equipment.html?key=%s"|args:$key - target="_dialog"}} -*}} {{:linkbutton - label="Historique" + label="Mouvements" href="equipment_history.html?key=%s&prop=1"|args:$key shape="table"}} {{:linkbutton diff --git a/_nav.html b/_nav.html index 10a41d0..c615e3d 100644 --- a/_nav.html +++ b/_nav.html @@ -3,13 +3,29 @@ diff --git a/archives.html b/archives.html index efb1a22..5525aab 100644 --- a/archives.html +++ b/archives.html @@ -66,11 +66,11 @@ }} - {{$name}} + {{:link href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key label=$name}} {{$col2}} {{:linkbutton - label="Historique" + label="Mouvements" href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key shape="table"}} {{:linkbutton diff --git a/default.json b/default.json index b9906b7..e46150c 100644 --- a/default.json +++ b/default.json @@ -26,7 +26,14 @@ { "key" : "c9ba00d9-26ee-448b-9f02-73e479ec2980", "label" : "Prêt", - "type" : "temporaire" + "type" : "temporaire", + "fee" : "gratuit" + }, + { + "key" : "5c6c20bf-53e9-49dc-bcd6-e3cac23a6786", + "label" : "Location", + "type" : "temporaire", + "fee" : "payant" }, { "key" : "fefefa51-1a85-46ca-ab78-b594b10390ff", diff --git a/equipment_history.html b/equipment_history.html index 83c0860..eda9501 100644 --- a/equipment_history.html +++ b/equipment_history.html @@ -31,25 +31,6 @@ {{else}} {{:assign current="inventaire"}} {{/if}} -{{:include file="./_nav.html" current=$current subcurrent="historique" eqpmt=$equipment.name category=$category.name}} - -{{if $_GET.ok}} - {{if $_GET.msg == "modification"}} -

Modification enregistrée

- {{elseif $_GET.msg == "copie"}} -

Mouvement copié

- {{elseif $_GET.msg == "retour"}} -

Retour enregistré

- {{elseif $_GET.msg == "suppression"}} -

Mouvement supprimé

- {{else}} -

Mouvement enregistré

- {{/if}} -{{elseif $_GET.err}} - {{if $_GET.msg == "suppression"}} -

Ce mouvement ne peut être supprimé

- {{/if}} -{{/if}} {{* récupérer la config des entrées/sorties *}} {{:include file="./_get_config.html" keep="config"}} @@ -248,6 +229,29 @@ {{:assign var="prop_options." value="1" label="Matériels propriété de l'association" href="?key=%s&prop=1"|args:$_GET.key}} {{:assign var="prop_options." value="0" label="Matériels NON propriété de l'association" href="?key=%s&prop=0"|args:$_GET.key}} +{{if $dispo_final > 0 && $selected_prop == null || $selected_prop}} + {{:assign sortie="sortie"}} +{{/if}} +{{:include file="./_nav.html" current=$current subcurrent="mouvements" eqpmt=$equipment.name category=$category.name sortie=$sortie key=$_GET.key}} + +{{if $_GET.ok}} + {{if $_GET.msg == "modification"}} +

Modification enregistrée

+ {{elseif $_GET.msg == "copie"}} +

Mouvement copié

+ {{elseif $_GET.msg == "retour"}} +

Retour enregistré

+ {{elseif $_GET.msg == "suppression"}} +

Mouvement supprimé

+ {{else}} +

Mouvement enregistré

+ {{/if}} +{{elseif $_GET.err}} + {{if $_GET.msg == "suppression"}} +

Ce mouvement ne peut être supprimé

+ {{/if}} +{{/if}} +
Filtrer par appartenance {{:dropdown @@ -257,17 +261,6 @@ }}
-{{if $current != "archives"}} - -{{/if}} - {{* lister les mouvements du matériel passé en paramètre *}} {{#list type="movement" @@ -275,6 +268,7 @@ where="%s"|args:$prop_condition equipment=$equipment_key order=1 + desc=true }} {{:assign var="type_mvt" from="config.%s_nature.%s.type"|args:$direction:$operation}} {{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}} @@ -352,10 +346,6 @@ {{/list}} -{{if $dispo_final == 0 && $stock > 0 && $current != "archives"}} - Il n'y a aucun matériel disponible, il n'est donc pas possible d'effectuer une sortie -{{/if}} - {{:admin_footer}} diff --git a/index.html b/index.html index 740bf3b..d05fab9 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,9 @@ {{else}} {{#restrict block=true section="accounting" level="write"}}{{/restrict}} + {{#load type="category" count=true limit=1 assign="result"}}{{/load}} + {{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count subcurrent="stock"}} + {{if $_GET.ok}} {{if $_GET.msg == "ajout" }}

Ajout effectué

@@ -28,9 +31,6 @@

Modification refusée

{{/if}} - {{#load type="category" count=true limit=1 assign="result"}}{{/load}} - {{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count subcurrent="stock"}} - {{if $result.count == 0}}

Il n'y a aucune catégorie : vous devez en ajouter.

{{else}} diff --git a/loan_history.html b/loan_history.html index a7ff7de..92c4ee1 100644 --- a/loan_history.html +++ b/loan_history.html @@ -99,10 +99,6 @@ }} -
-

{{$label|ucfirst}} de matériel en cours

-
- {{:assign premier=true}} {{#select users.nom AS nom, diff --git a/loan_movements.html b/loan_movements.html index 4a3f859..cf9fcda 100644 --- a/loan_movements.html +++ b/loan_movements.html @@ -104,10 +104,6 @@ }} -
-

Historique des {{$label}}s

-
- {{* lister les mouvements *}} {{:assign premier=true}} {{#select * FROM diff --git a/member_loan.html b/member_loan.html index 9f40061..28f7278 100644 --- a/member_loan.html +++ b/member_loan.html @@ -42,10 +42,6 @@ {{:assign out_keys=$out_keys|implode:","}} {{:assign out_keys="("|cat:$out_keys|cat:")"}} -
-

{{$label|ucfirst}}s aux membres

-
- {{:assign premier=true}} {{#select nom, user, GROUP_CONCAT(mat_name, ", ") AS materiel, SUM(remain) AS quantite @@ -90,12 +86,20 @@ {{$materiel}} {{else}} -

Aucun mouvement.

+ {{if $label == "prêt"}} +

Aucun {{$label}} en cours.

+ {{elseif $label == "location"}} +

Aucune {{$label}} en cours.

+ {{/if}} {{/select}} {{else}} -

Aucun mouvement.

+ {{if $label == "prêt"}} +

Aucun {{$label}} en cours.

+ {{elseif $label == "location"}} +

Aucune {{$label}} en cours.

+ {{/if}} {{/if}} {{:admin_footer}} diff --git a/movements/add_new_equipment.html b/movements/add_new_equipment.html index 30614d6..456cfdd 100644 --- a/movements/add_new_equipment.html +++ b/movements/add_new_equipment.html @@ -150,7 +150,7 @@
- Informations facultatives + Autres informations
{{if $storage != null}} {{:input type="select" name="storage" label="Lieu de stockage" default_empty="— Aucun —" options=$storage required=false}} diff --git a/movements/copy_movement.html b/movements/copy_movement.html index e1ebf4e..258c2d1 100644 --- a/movements/copy_movement.html +++ b/movements/copy_movement.html @@ -278,7 +278,7 @@
- Informations facultatives + Autres informations
{{if $prop == 1 && $mvt_new.direction == "output"}} {{:input diff --git a/movements/input_equipment.html b/movements/input_equipment.html index 31fe136..502580e 100644 --- a/movements/input_equipment.html +++ b/movements/input_equipment.html @@ -116,7 +116,7 @@
- Informations facultatives + Autres informations
{{if $storage != null}} {{:input type="select" name="storage" label="Lieu de stockage" default_empty="— Aucun —" options=$storage required=false}} diff --git a/movements/modify_movement.html b/movements/modify_movement.html index 5a9f1bd..4738698 100644 --- a/movements/modify_movement.html +++ b/movements/modify_movement.html @@ -302,7 +302,7 @@
- Informations facultatives + Autres informations
{{if $prop == 1 && $mvt_new.direction == "output"}} {{:input diff --git a/movements/output_return.html b/movements/output_return.html index ba51ec2..b5c5e9c 100644 --- a/movements/output_return.html +++ b/movements/output_return.html @@ -220,7 +220,7 @@
- Informations facultatives + Autres informations
{{if $storage != null}} {{:input type="select" name="storage" label="Lieu de stockage" default_empty="— Aucun —" options=$storage required=false}} diff --git a/snippets/_details.html b/snippets/_details.html index 9ab9458..10a1fe1 100644 --- a/snippets/_details.html +++ b/snippets/_details.html @@ -135,9 +135,9 @@ {{if $retard < 0}} {{:assign delai="abs(%d)"|math:$retard}} {{"Reste %s jours"|args:$delai}} - {{elseif $retard >0 }} + {{elseif $retard > 0 }} {{:tag color="darkred" label="Retard %s jours"|args:$retard}} - {{else}} + {{elseif $return_date != null}} {{:tag color="darkgreen" label="À rendre aujourdh'ui"}} {{/if}}