Ajout détails mouvement et possibilité joindre fichier

This commit is contained in:
Jean-Christophe Engel 2025-10-15 14:30:26 +02:00
parent 2ba9c20037
commit 14cf1a520d
2 changed files with 125 additions and 42 deletions

View file

@ -28,6 +28,7 @@
{{else}}
{{:error message="Le matériel %s n'appartient à aucune catégorie"|args:$equipment.name}}
{{/load}}
{{:admin_header title="Gestion des matériels" custom_css="./style.css" current="module_equipment"}}
{{if $_GET.current != null}}
@ -176,11 +177,11 @@
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
ELSE ''
END AS 'Stockage';
$$.comment AS 'Commentaire'
'' AS 'Doc'
"|args:$config.user_fields.name_sql
equipment=$equipment_key
order=1
}}
}}
{{: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}}
@ -190,6 +191,12 @@
{{:assign var="stock" from="quantites.%s.stock"|args:$id}}
{{:assign var="exterieur" from="quantites.%s.exterieur"|args:$id}}
{{:assign var="dispo" from="quantites.%s.dispo"|args:$id}}
{{:assign file_path="%s/%s/"|args:$module.storage_root:$key}}
{{:assign file_path=$file_path|cat:"%"}}
{{#select count(*) AS nb FROM files WHERE path LIKE :file_path ; :file_path=$file_path}}
{{:assign nb_files=$nb}}
{{/select}}
<tr>
<td>{{$date|date_short}}</td>
<td>{{$col2}}</td>
@ -200,7 +207,7 @@
<td class="num nosort">{{$dispo}}</td>
<td>{{:link href="/admin/users/details.php?id=%s"|args:$user label="%s"|args:$col8}}</td>
<td>{{$col9}}</td>
<td>{{$comment}}</td>
<td class="num nosort">{{if $nb_files > 0}}{{:tag label="%s"|args:$nb_files}}{{:icon shape="attach"}}{{/if}}</td>
<td class="actions">
{{if $current != "archives"}}
{{if $direction == "output" && $type_mvt == "temporaire"}}
@ -214,25 +221,11 @@
target="_dialog"}}
{{/if}}
{{/if}}
{{if $direction == "input" && $type_mvt == "retour"}}
{{* interdire dupliquer *}}
{{else}}
{{:linkbutton
label="Dupliquer"
href="movements/copy_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
shape="plus"
target="_dialog"}}
{{/if}}
{{:linkbutton
label="Modifier"
href="movements/modify_movement.html?key=%s"|args:$key
shape="edit"
target="_dialog"}}
{{:linkbutton
label="Supprimer"
href="movements/delete_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
shape="delete"
target="_dialog"}}
label="Détails"
href="movements/movement_details.html?key=%s&prop=%s"|args:$key:$_GET.prop
shape="eye"
}}
{{/if}}
</td>
</tr>
@ -276,8 +269,8 @@
CASE WHEN $$.storage NOT NULL
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
ELSE ''
END as 'Stockage';
$$.comment AS 'Commentaire'"
END as 'Stockage'
"
equipment=$equipment_key
order=1
}}
@ -295,7 +288,6 @@
<td class="num">{{$amount}}</td>
<td class="num nosort">{{$stock}}</td>
<td>{{$col6}}</td>
<td>{{$comment}}</td>
<td class="actions">
{{if $direction == "input" && $type_mvt == "temporaire"}}
{{:assign var="temp_in" from="present.%s"|args:$key}}
@ -308,25 +300,11 @@
target="_dialog"}}
{{/if}}
{{/if}}
{{if $direction == "output" && $type_mvt == "retour"}}
{{* interdire dupliquer *}}
{{else}}
{{:linkbutton
label="Dupliquer"
href="movements/copy_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
shape="plus"
target="_dialog"}}
{{/if}}
{{:linkbutton
label="Modifier"
href="movements/modify_movement.html?key=%s"|args:$key
shape="edit"
target="_dialog"}}
{{:linkbutton
label="Supprimer"
href="movements/delete_movement.html?key=%s&prop=%s"|args:$key:$_GET.prop
shape="delete"
target="_dialog"}}
label="Détails"
href="movements/movement_details.html?key=%s&prop=%s"|args:$key:$_GET.prop
shape="eye"
}}
</td>
</tr>
{{/if}}