réorganisation (cf remarques Bohwaz)
This commit is contained in:
parent
6006bdd169
commit
0e669a7c21
23 changed files with 279 additions and 236 deletions
|
|
@ -9,11 +9,11 @@
|
|||
{{#form on="delete"}}
|
||||
{{* Vérifier s'il reste des matériels dans cette catégorie *}}
|
||||
{{#load type="equipment" category=$_GET.key assign="equipment"}}
|
||||
{{:redirect force="./index.html?err=1&msg=Cette catégorie ne peut être supprimée car elle contient encore des matériels"}}
|
||||
{{:redirect force="./index.html?err=1&msg=suppression"}}
|
||||
{{else}}
|
||||
{{* supprimer la catégorie sélectionnée*}}
|
||||
{{:delete where="key = :key" :key=$category.key}}
|
||||
{{:redirect force="./index.html?ok=1&msg=La catégorie « %s » a été supprimée"|args:$category.name}}
|
||||
{{:redirect force="./index.html?ok=1&msg=suppression"}}
|
||||
{{/load}}
|
||||
|
||||
{{/form}}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,19 @@
|
|||
{{:include file="../_nav.html" current="categories"}}
|
||||
|
||||
{{if $_GET.ok}}
|
||||
<p class="block confirm">{{$_GET.msg}}</p>
|
||||
{{else}}
|
||||
{{if $_GET.err}}
|
||||
<p class="block error">{{$_GET.msg}}</p>
|
||||
{{/if}}
|
||||
{{if $_GET.msg == "modification"}}
|
||||
<p class="block confirm">Modification enregistrée</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block confirm">Catégorie supprimée</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{if $_GET.msg == "modification"}}
|
||||
<p class="block error">{{$_GET.msg}}</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block error">
|
||||
Cette catégorie ne peut être supprimée car elle contient encore des matériels
|
||||
</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{* afficher les catégories déjà enregistrées *}}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
type="category"
|
||||
name=$_POST.name|trim
|
||||
}}
|
||||
{{:redirect force="./index.html?ok=1&msg=Catégorie modifiée"}}
|
||||
{{:redirect force="./index.html?ok=1&msg=modification"}}
|
||||
{{/form}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue