a48ef7f719494535294041dae6c52bab74c29110
[mw_pages] / out / dist / views / pages / admin / list.php
1 <h2>Pages</h2>
2
3 <ul class="admin">
4   <li><a class="add" href="<?= $this->url("pages/admin/add") ?>">Nouvelle page</a></li>
5 </ul>
6
7 <form name="accueil_form" action="<?= $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=""<?= $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="<?= $this->url("pages/admin") ?>"<?= 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 if($this->out["pages"]["total"] > $this->config("max_list")) : ?>
35
36 <?php $items = "pages"; $legend = "pages"; require $this->out_file("views/navig.php"); ?>
37
38 <?php endif; ?>
39
40 <form name="pages_form" action="<?= $this->url("pages/admin/edit_pages") ?>" method="post">
41 <table class="admin">
42   <tr>
43     <th>titre</th>
44     <th>date cr&eacute;ation</th>
45     <th align="center">position</th>
46     <th align="center">active</th>
47     <th align="center" colspan="2">actions</th>
48   </tr>
49 <?php foreach($this->out["pages"]["list"] as $id_page => $page) : ?>
50   <tr class="hl">
51     <td><?= $page["title"] ?></td>
52     <td><?= date("j M Y : G\hi", datetime2timestamp($page["date_creation"])) ?></td>
53     <td class="action"><input type="text" size="3" name="position_<?= $id_page ?>" value="<?= $page["position"] ?>" /></td>
54     <td class="action"><input type="checkbox" name="enabled_<?= $id_page ?>" <?= $page["enabled"] ? "checked=\"checked\"" : "" ?> /></td>
55     <td class="action">
56     <a href="<?= $this->url("pages/admin/edit", array("id" => $id_page)) ?>"
57        class="admin_link"
58        title="modifier cette page"><img src="<?= $this->out_file("icons/edit.gif") ?>" /></a>
59     </td>
60     <td class="action">
61     <a href="<?= $this->url("pages/admin/del", array("id" => $id_page)) ?>"
62        class="admin_link"
63        title="supprimer cette page"><img src="<?= $this->out_file("icons/del.gif") ?>"
64        onclick="return confirm('Supprimer cette page ?')"/></a>
65     </td>
66   </tr>
67 <?php endforeach; ?>
68   <tr class="hl">
69     <td colspan="2">&nbsp;</td>
70     <td colspan="2" align="center"><input type="submit" value="Enregistrer" /></td>
71     <td colspan="2">&nbsp;</td>
72   </tr>
73 </table>
74 </form>
75
76 <?php else : ?>
77 <p>Aucune page pour le moment.</p>
78 <?php endif; ?>