Amélioration présentation et navigation
This commit is contained in:
parent
e28d1b8195
commit
1961431942
15 changed files with 84 additions and 103 deletions
|
|
@ -112,7 +112,7 @@
|
|||
{{else}}
|
||||
{{:assign prop="&prop=%s"|args:$selected_prop}}
|
||||
{{/if}}
|
||||
<td>{{:link href="equipment_history.html?key=%s&prop=%s"|args:$key:$selected_prop" label=$name}}</td>
|
||||
<td>{{:link href="equipment_history.html?key=%s&prop=%s"|args:$key:$selected_prop label=$name}}</td>
|
||||
<td>{{$cat_name}}</td>
|
||||
<td class="num">{{$stock}}</td>
|
||||
<td class="num">{{$col4}}</td>
|
||||
|
|
@ -120,22 +120,8 @@
|
|||
<td class="num">{{$out}}</td>
|
||||
<td class="num">{{$col7}}</td>
|
||||
<td class="actions">
|
||||
{{*
|
||||
{{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
|
||||
|
|
|
|||
54
_nav.html
54
_nav.html
|
|
@ -3,13 +3,29 @@
|
|||
<nav class="tabs">
|
||||
{{if $current == 'inventaire'}}
|
||||
<aside>
|
||||
{{if $subcurrent == 'stock' && $cat == 0}}
|
||||
{{if $subcurrent == 'stock'}}
|
||||
{{if $cat == 0}}
|
||||
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}}
|
||||
{{else}}
|
||||
{{if $subcurrent == 'stock'}}
|
||||
{{else}}
|
||||
{{:exportmenu right=true}}
|
||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}}
|
||||
{{elseif $subcurrent == "mouvements"}}
|
||||
{{if $sortie != null}}
|
||||
{{: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"}}
|
||||
{{/if}}
|
||||
</aside>
|
||||
{{elseif $current == 'config'}}
|
||||
<aside>
|
||||
{{if $subcurrent == 'categories'}}
|
||||
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="add_category.html" target="_dialog"}}
|
||||
{{elseif $subcurrent == 'storage'}}
|
||||
{{:linkbutton label="Ajouter un lieu de stockage" shape="plus" href="add_storage.html" target="_dialog"}}
|
||||
{{elseif $subcurrent == 'typesES'}}
|
||||
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/add_movement_type.html?dir=input" target="_dialog"}}
|
||||
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/add_movement_type.html?dir=output" target="_dialog"}}
|
||||
{{/if}}
|
||||
</aside>
|
||||
{{/if}}
|
||||
|
|
@ -24,49 +40,35 @@
|
|||
</ul>
|
||||
|
||||
{{if $current == 'inventaire'}}
|
||||
{{if $subcurrent == 'historique'}}
|
||||
{{if $subcurrent == 'mouvements'}}
|
||||
<ul class="sub">
|
||||
<li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li>
|
||||
<li class="title"><strong>Mouvements — {{$eqpmt}} ({{$category}})</strong></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{elseif $current == 'prêt'}}
|
||||
<ul class="sub">
|
||||
<li {{if $subcurrent == 'encours'}} class="current"{{/if}}><a href="{{$module.url}}loan_history.html?output_type=loan">En cours</a></li>
|
||||
<li {{if $subcurrent == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}loan_movements.html?output_type=loan">Historique</a></li>
|
||||
<li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=loan">Membres</a></li>
|
||||
<li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=loan">Prêts en cours aux membres</a></li>
|
||||
</ul>
|
||||
{{elseif $current == 'location'}}
|
||||
<ul class="sub">
|
||||
<li {{if $subcurrent == 'encours'}} class="current"{{/if}}><a href="{{$module.url}}loan_history.html?output_type=rent">En cours</a></li>
|
||||
<li {{if $subcurrent == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}loan_movements.html?output_type=rent">Historique</a></li>
|
||||
<li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=rent">Membres</a></li>
|
||||
<li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=rent">Locations en cours aux membres</a></li>
|
||||
</ul>
|
||||
{{elseif $current == 'archives'}}
|
||||
{{if $subsubcurrent == 'historique'}}
|
||||
{{if $subcurrent == 'mouvements'}}
|
||||
<ul class="sub">
|
||||
<li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{elseif $current == 'config'}}
|
||||
{{if $subcurrent == 'categories'}}
|
||||
<aside>
|
||||
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="add_category.html" target="_dialog"}}
|
||||
</aside>
|
||||
{{elseif $subcurrent == 'storage'}}
|
||||
<aside>
|
||||
{{:linkbutton label="Ajouter un lieu de stockage" shape="plus" href="add_storage.html" target="_dialog"}}
|
||||
</aside>
|
||||
{{elseif $subcurrent == 'typesES'}}
|
||||
<aside>
|
||||
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/add_movement_type.html?dir=input" target="_dialog"}}
|
||||
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/add_movement_type.html?dir=output" target="_dialog"}}
|
||||
</aside>
|
||||
{{/if}}
|
||||
<ul class="sub">
|
||||
<li {{if $subcurrent == 'categories'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Catégories</a></li>
|
||||
<li {{if $subcurrent == 'storage'}} class="current"{{/if}}><a href="{{$module.url}}storage/index.html">Lieux de stockage</a></li>
|
||||
<li {{if $subcurrent == 'typesES'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Types d'entrées/sorties</a></li>
|
||||
<li {{if $subcurrent == 'divers'}} class="current"{{/if}}><a href="{{$module.url}}config/misc.html">Divers</a></li>
|
||||
<li {{if $subcurrent == 'storage'}} class="current"{{/if}}><a href="{{$module.url}}storage/index.html">Lieux de stockage</a></li>
|
||||
<li {{if $subcurrent == 'typesES'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Types d'entrées/sorties</a></li>
|
||||
<li {{if $subcurrent == 'divers'}} class="current"{{/if}}><a href="{{$module.url}}config/misc.html">Divers</a></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@
|
|||
}}
|
||||
|
||||
<tr>
|
||||
<td>{{$name}}</td>
|
||||
<td>{{:link href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key label=$name}}</td>
|
||||
<td>{{$col2}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Historique"
|
||||
label="Mouvements"
|
||||
href="equipment_history.html?key=%s&prop=1¤t=archives"|args:$key
|
||||
shape="table"}}
|
||||
{{:linkbutton
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"}}
|
||||
<p class="block confirm">Modification enregistrée</p>
|
||||
{{elseif $_GET.msg == "copie"}}
|
||||
<p class="block confirm">Mouvement copié</p>
|
||||
{{elseif $_GET.msg == "retour"}}
|
||||
<p class="block confirm">Retour enregistré</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block confirm">Mouvement supprimé</p>
|
||||
{{else}}
|
||||
<p class="block confirm">Mouvement enregistré</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{if $_GET.msg == "suppression"}}
|
||||
<p class="block error">Ce mouvement ne peut être supprimé</p>
|
||||
{{/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"}}
|
||||
<p class="block confirm">Modification enregistrée</p>
|
||||
{{elseif $_GET.msg == "copie"}}
|
||||
<p class="block confirm">Mouvement copié</p>
|
||||
{{elseif $_GET.msg == "retour"}}
|
||||
<p class="block confirm">Retour enregistré</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block confirm">Mouvement supprimé</p>
|
||||
{{else}}
|
||||
<p class="block confirm">Mouvement enregistré</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{if $_GET.msg == "suppression"}}
|
||||
<p class="block error">Ce mouvement ne peut être supprimé</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<fieldset class="shortFormRight">
|
||||
<legend>Filtrer par appartenance</legend>
|
||||
{{:dropdown
|
||||
|
|
@ -257,17 +261,6 @@
|
|||
}}
|
||||
</fieldset>
|
||||
|
||||
{{if $current != "archives"}}
|
||||
<nav class="tabs">
|
||||
<aside>
|
||||
{{if $dispo_final > 0 && $selected_prop == null || $selected_prop}}
|
||||
{{:linkbutton label="Sortie" shape="minus" href="movements/output_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton label="Entrée" shape="plus" href="movements/input_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||
</aside>
|
||||
</nav>
|
||||
{{/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 @@
|
|||
</tr>
|
||||
{{/list}}
|
||||
|
||||
{{if $dispo_final == 0 && $stock > 0 && $current != "archives"}}
|
||||
<span class="help">Il n'y a aucun matériel disponible, il n'est donc pas possible d'effectuer une sortie</span>
|
||||
{{/if}}
|
||||
|
||||
{{:admin_footer}}
|
||||
|
||||
<script type="text/javascript" src="scripts.js"></script>
|
||||
|
|
|
|||
|
|
@ -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" }}
|
||||
<p class="block confirm">Ajout effectué</p>
|
||||
|
|
@ -28,9 +31,6 @@
|
|||
<p class="block error">Modification refusée</p>
|
||||
{{/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}}
|
||||
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||
{{else}}
|
||||
|
|
|
|||
|
|
@ -99,10 +99,6 @@
|
|||
}}
|
||||
</fieldset>
|
||||
|
||||
<div class="shortFormLeft">
|
||||
<p class="help">{{$label|ucfirst}} de matériel en cours</p>
|
||||
</div>
|
||||
|
||||
{{:assign premier=true}}
|
||||
{{#select
|
||||
users.nom AS nom,
|
||||
|
|
|
|||
|
|
@ -104,10 +104,6 @@
|
|||
}}
|
||||
</fieldset>
|
||||
|
||||
<div class="shortFormLeft">
|
||||
<p class="help">Historique des {{$label}}s</p>
|
||||
</div>
|
||||
|
||||
{{* lister les mouvements *}}
|
||||
{{:assign premier=true}}
|
||||
{{#select * FROM
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@
|
|||
{{:assign out_keys=$out_keys|implode:","}}
|
||||
{{:assign out_keys="("|cat:$out_keys|cat:")"}}
|
||||
|
||||
<div class="shortFormLeft">
|
||||
<p class="help">{{$label|ucfirst}}s aux membres</p>
|
||||
</div>
|
||||
|
||||
{{:assign premier=true}}
|
||||
{{#select
|
||||
nom, user, GROUP_CONCAT(mat_name, ", ") AS materiel, SUM(remain) AS quantite
|
||||
|
|
@ -90,12 +86,20 @@
|
|||
<td>{{$materiel}}</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<p class="block alert">Aucun mouvement.</p>
|
||||
{{if $label == "prêt"}}
|
||||
<p class="block alert">Aucun {{$label}} en cours.</p>
|
||||
{{elseif $label == "location"}}
|
||||
<p class="block alert">Aucune {{$label}} en cours.</p>
|
||||
{{/if}}
|
||||
{{/select}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<p class="block alert">Aucun mouvement.</p>
|
||||
{{if $label == "prêt"}}
|
||||
<p class="block alert">Aucun {{$label}} en cours.</p>
|
||||
{{elseif $label == "location"}}
|
||||
<p class="block alert">Aucune {{$label}} en cours.</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{:admin_footer}}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Informations facultatives</legend>
|
||||
<legend>Autres informations</legend>
|
||||
<dl>
|
||||
{{if $storage != null}}
|
||||
{{:input type="select" name="storage" label="Lieu de stockage" default_empty="— Aucun —" options=$storage required=false}}
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="entree">
|
||||
<legend>Informations facultatives</legend>
|
||||
<legend>Autres informations</legend>
|
||||
<dl>
|
||||
{{if $prop == 1 && $mvt_new.direction == "output"}}
|
||||
{{:input
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="entree">
|
||||
<legend>Informations facultatives</legend>
|
||||
<legend>Autres informations</legend>
|
||||
<dl>
|
||||
{{if $storage != null}}
|
||||
{{:input type="select" name="storage" label="Lieu de stockage" default_empty="— Aucun —" options=$storage required=false}}
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@
|
|||
</fieldset>
|
||||
|
||||
<fieldset class="entree">
|
||||
<legend>Informations facultatives</legend>
|
||||
<legend>Autres informations</legend>
|
||||
<dl>
|
||||
{{if $prop == 1 && $mvt_new.direction == "output"}}
|
||||
{{:input
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="entree">
|
||||
<legend>Informations facultatives</legend>
|
||||
<legend>Autres informations</legend>
|
||||
<dl>
|
||||
{{if $storage != null}}
|
||||
{{:input type="select" name="storage" label="Lieu de stockage" default_empty="— Aucun —" options=$storage required=false}}
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue