1 <h2>Les rôles</h2>
3 <h3>Politique d'accès</h3>
5 <label for="default_allow">Autoriser l'accès par défaut</label>
6 <select id="default_allow" onchange="document.location=this.options[this.selectedIndex].value;">
7 <option value="<?php echo $this->url("admin/users/set_default_allow", array("id" => "1")); ?>"<?php echo $this->config("default_allow") ? " selected" : ""; ?>>oui</option>
8 <option value="<?php echo $this->url("admin/users/set_default_allow", array("id" => "0")); ?>"<?php echo $this->config("default_allow") ? "" : " selected"; ?> />non</option>
14 Autorisations d'accès pour
15 <select onchange="document.location=this.options[this.selectedIndex].value;">
16 <option value="<?php echo $this->url("admin/users/roles", array("id" => 0)); ?>">Visiteurs non identifiés</option>
17 <?php foreach($this->out["roles"] as $id_role => $role) : ?>
18 <option value="<?php echo $this->url("admin/users/roles", array("id" => $id_role)); ?>"<?php echo $this->out["id_role"] == $id_role ? " selected" : ""; ?>><?php echo $role["intitule"]; ?></option>
21 <?php if($this->out["id_role"]) : ?>
22 <a href="<?php echo $this->url("admin/users/edit_role", array("id" => $this->out["id_role"])); ?>"
24 title="modifier ce role"><img src="<?php echo $this->out_url("icons/edit.gif"); ?>" /></a>
25 <a href="<?php echo $this->url("admin/users/del_role", array("id" => $this->out["id_role"])); ?>"
27 title="supprimer ce role"><img src="<?php echo $this->out_url("icons/del.gif"); ?>"
28 onclick="return confirm('Supprimer ce role ?')"/></a>
30 <a href="<?php echo $this->url("admin/users/add_role"); ?>"
32 title="ajouter un role"><img src="<?php echo $this->out_url("icons/add.gif"); ?>" /></a>
36 <?php if($this->out["actions"]) : ?>
37 <form action="<?php echo $this->url("admin/users/save_role"); ?>" method="post">
38 <input type="hidden" name="id_role" value="<?php echo $this->out["id_role"]; ?>" />
40 <?php $index_al = 0; foreach($this->out["actions"] as $module_name => $module) : ?>
41 <li<?php echo $module["is_public"] ? " class=\"public\"" : "" ?>>
42 <input type="checkbox" name="module_<?php echo $module_name; ?>"<?php echo $module["module_allowed"] ? " checked" : "" ?> />
43 <label><?php echo $module_name; ?></label>
44 <?php if($module["controleurs"]) : ?>
46 <?php foreach($module["controleurs"] as $controleur_name => $controleur) : ?>
47 <li<?php echo $controleur["is_public"] ? " class=\"public\"" : "" ?>>
48 <input type="checkbox" name="controleur_<?php echo $module_name."/".$controleur_name; ?>"<?php echo $controleur["controleur_allowed"] ? " checked" : "" ?> />
49 <label><?php echo $controleur_name; ?></label>
50 <?php if($controleur["als"]) : ?>
52 <?php foreach($controleur["als"] as $al) : $index_al++; ?>
53 <li<?php echo $al["is_public"] ? " class=\"public\"" : "" ?>>
54 <input type="checkbox" name="al_<?php echo $index_al; ?>"<?php echo $al["action_allowed"] ? " checked" : "" ?> />
55 <?php foreach($al["actions"] as $index_action=> $action_name) : ?>
56 <input type="hidden" name="action_<?php echo $index_al; ?>_<?php echo $index_action; ?>" value="<?php echo $module_name."/".$controleur_name."/".$action_name; ?>" />
58 <label><?php echo $al["title"]; ?></label>
70 <div class="form_buttons">
71 <input type="submit" value="Enregistrer" />
77 <p>Aucune action déclarée</p>