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