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