gestion des erreurs en exceptions
[mw_pages] / out / default / views / pages / admin / list.php
1 <h2>Pages</h2>
2
3 <ul class="admin">
4   <li><a class="add" href="<?php echo $this->url("pages/admin/add"); ?>">Nouvelle page</a></li>
5 </ul>
6
7 <form name="accueil_form" action="<?php echo $this->url("pages/admin/set_accueil"); ?>" method="post">
8 <ul class="admin">
9   <li>Page d'accueil du site</li>
10   <li>
11     <select name="id">
12       <option value=""<?php echo $this->config("start_action") ? "" : " selected=\"selected\""; ?>>Page par d&eacute;faut du site</option>
13       <?php echo pages_arbo_start_select_options($this, $this->out["arbo"], $this->config("start_action"), $this->config("start_action_params"), "&nbsp;&nbsp;"); ?>
14     </select>
15   </li>
16   <li class="buttons">
17     <input type="submit" value="Enregistrer" />
18   </li>
19 </ul>
20 </form>
21
22 <ul class="admin">
23   <li>Page parente</li>
24   <li>
25     <select onchange="document.location=this.options[this.selectedIndex].value;">
26       <option value="<?php echo $this->url("pages/admin"); ?>"<?php echo isset($_GET[$this->param("parent")]) ? "" : " selected=\"selected\""; ?>>Afficher toutes les pages</option>
27       <?php echo pages_arbo_list_select_options($this, "pages/admin", $this->out["arbo"], $_GET[$this->param("parent")], "&nbsp;&nbsp;"); ?>
28     </select>
29   </li>
30 </ul>
31
32 <?php if($this->out["pages"]["total"]) : ?>
33
34 <?php $items = "pages"; $legend = "pages"; require $this->out_file("views/navig.php"); ?>
35
36 <form name="pages_form" action="<?php echo $this->url("pages/admin/edit_pages"); ?>" method="post">
37 <table class="admin">
38   <tr>
39     <th>titre</th>
40     <th>date cr&eacute;ation</th>
41     <th align="center">position</th>
42     <th align="center">active</th>
43     <th align="center" colspan="2">actions</th>
44   </tr>
45 <?php foreach($this->out["pages"]["list"] as $id_page => $page) : ?>
46   <tr class="hl">
47     <td><?php echo $page["title"]; ?></td>
48     <td><?php echo date("j M Y : G\hi", datetime2timestamp($page["date_creation"])); ?></td>
49     <td class="action"><input type="text" size="3" name="position_<?php echo $id_page; ?>" value="<?php echo $page["position"]; ?>" /></td>
50     <td class="action"><input type="checkbox" name="enabled_<?php echo $id_page; ?>" <?php echo $page["enabled"] ? "checked=\"checked\"" : ""; ?> /></td>
51     <td class="action">
52     <a href="<?php echo $this->url("pages/admin/edit", array("id" => $id_page)); ?>"
53        class="admin_link"
54        title="modifier cette page"><img src="<?php echo $this->out_url("icons/edit.gif"); ?>" /></a>
55     </td>
56     <td class="action">
57     <a href="<?php echo $this->url("pages/admin/del", array("id" => $id_page)); ?>"
58        class="admin_link"
59        title="supprimer cette page"><img src="<?php echo $this->out_url("icons/del.gif"); ?>"
60        onclick="return confirm('Supprimer cette page ?')"/></a>
61     </td>
62   </tr>
63 <?php endforeach; ?>
64   <tr class="hl">
65     <td colspan="2">&nbsp;</td>
66     <td colspan="2" align="center"><input type="submit" value="Enregistrer" /></td>
67     <td colspan="2">&nbsp;</td>
68   </tr>
69 </table>
70 </form>
71
72 <?php else : ?>
73 <p>Aucune page pour le moment.</p>
74 <?php endif; ?>