syntaxe POO (visibilité)
[mw_actions_logs] / actions_logs / logs_actions.php
1 <h2>Liste des actions</h2>
2
3 <ul class="buttons">
4   <li><a class="add" href="<?php echo $this->url("config/actions_logs/add_log_action"); ?>">Ajouter une action dans la liste</a></li>
5   <li><a href="<?php echo $this->url("config/actions_logs/del_logs_actions"); ?>"
6        class="del"
7        onclick="return confirm('Vider la liste ?')">Vider la liste <img src="<?php echo $this->out_url("icons/del.gif"); ?>"/></a></li>
8 </ul>
9
10 <p>
11   <a href="<?php echo $this->url("config/actions_logs/config"); ?>"><strong>Configuration actuelle</strong></a> :
12 </p>
13 <p>
14   <?php if($this->out["actions_logs_config"]["default_log"]) : ?>
15   enregistrer un historique pour chaque action,
16   <?php else : ?>
17   n'enregistrer un historique pour aucune action,
18   <?php endif; ?>
19   sauf si l'action est dans cette liste.
20 </p>
21
22 <?php if($this->out["logs_actions"]["list"]) : ?>
23
24 <form name="logs_actions_form" action="<?php echo $this->url("config/actions_logs/logs_actions"); ?>" method="post">
25
26   <fieldset>
27     <table class="admin" id="logs_actions" <?php echo $this->out["logs_actions"] ? "" : "style=\"display: none\""; ?>>
28       <tr>
29         <th>Action</th>
30         <?php if(!$this->out["actions_logs_config"]["default_log"]) : ?>
31         <th width="65" align="center"><span class="<?php echo $default_log_class; ?>">GET</span></th>
32         <th width="65" align="center"><span class="<?php echo $default_log_class; ?>">POST</span></th>
33         <?php endif; ?>
34         <th>Enlever</th>
35       </tr>
36       <?php foreach($this->out["logs_actions"]["list"] as $id_log_action => $log_action) : ?>
37       <?php $default_log_class = "default_log_".($this->out["actions_logs_config"]["default_log"] ? "on" : "off"); ?>
38       <tr id="log_action_<?php echo $log_action["id"]; ?>" class="hl">
39         <td>
40           <?php echo $log_action["action"]; ?>
41           <input type="hidden" name="id_log_action_<?php echo $log_action["id"]; ?>" value="<?php echo $log_action["id"]; ?>" />
42         </td>
43         <?php if(!$this->out["actions_logs_config"]["default_log"]) : ?>
44         <td align="center">
45           <span class="<?php echo $default_log_class; ?>">
46             <input type="checkbox" name="log_get_<?php echo $log_action["id"]; ?>" <?php echo $log_action["log_get"] ? "checked" : ""; ?> />
47           </span> 
48         </td>
49         <td align="center">
50           <span class="<?php echo $default_log_class; ?>">
51             <input type="checkbox" name="log_post_<?php echo $log_action["id"]; ?>" <?php echo $log_action["log_post"] ? "checked" : ""; ?> />
52           </span>
53         </td>
54         <?php endif; ?>
55         <td align="center">
56           <a href="<?php echo $this->url("config/actions_logs/del_log_action", array("id" => $log_action["id"])); ?>"
57              class="admin_link del_action"
58              id="del_action_<?php echo $log_action["id"]; ?>"
59              title="Enlever cette action de la liste"><img src="<?php echo $this->out_url("icons/del.gif"); ?>"/></a>
60         </td>
61       </tr>
62       <?php endforeach; ?>
63     </table>
64     <?php if(!$this->out["actions_logs_config"]["default_log"]) : ?>
65     <ul>
66       <li>
67         <div class="form_buttons">
68           <input type="submit" value="Enregistrer les modifications" />
69         </div>
70       </li>
71     </ul>
72     <?php endif; ?>
73   </fieldset>
74
75 </form>
76
77 <?php else : ?>
78 <p>Aucune action listée pour le moment.</p>
79 <?php endif; ?>