sourceml devient un plugin mtweb
[mw_sourceml] / app / out / default / views / users / albums / list.php
1 <h2>Albums</h2>
2
3 <ul class="buttons">
4   <li><a class="add" href="<?php echo $this->url("users/albums/add") ?>">Nouvel album</a></li>
5 </ul>
6
7 <?php if($this->out["groupes"]["total"] > 0) : ?>
8
9 <ul class="filters">
10   <li>
11     <select onchange="document.location=this.options[this.selectedIndex].value;">
12       <option value="<?php echo $this->url("users/albums") ?>"<?php echo $_GET[$this->param("groupe")] == "0" ? " selected=\"selected\"" : "" ?>>Tous les groupes</option>
13       <?php foreach($this->out["groupes"]["list"] as $id_groupe => $groupe) : ?>
14       <option value="<?php echo $this->url("users/albums", array("groupe" => $id_groupe)) ?>"<?php echo $_GET[$this->param("groupe")] == $id_groupe ? " selected=\"selected\"" : "" ?>><?php echo $groupe["nom"] ?></option>
15       <?php endforeach; ?>
16     </select>
17   </li>
18 </ul>
19
20 <?php endif; ?>
21
22 <?php if($this->out["albums"]["list"]) : ?>
23
24 <?php $items = "albums"; $legend = "albums"; require $this->out_file("views/navig.php"); ?>
25
26 <?php
27
28   $get_params = array();
29   if(isset($_GET[$this->param("groupe")]) && $_GET[$this->param("groupe")]) $get_params["groupe"] = $_GET[$this->param("groupe")];
30
31 ?>
32 <form name="sources_form" action="<?php echo $this->url("users/albums", $get_params) ?>" method="post">
33   <fieldset>
34     <table class="admin">
35       <tr>
36         <th>titre</th>
37         <th>ordre</th>
38         <th align="center" colspan="2">actions</th>
39       </tr>
40     <?php foreach($this->out["albums"]["list"] as $id_album => $album) : ?>
41       <tr class="hl">
42         <td>
43     <?php if($album["reference"]) : ?>
44           <?php echo $album["reference"]["titre"] ?> <span>[ r&eacute;f&eacute;rence &raquo; <a href="<?php echo $album["reference"]["from"] ?>"><?php echo $album["reference"]["auteur"] ?></a> ]</span>
45     <?php else : ?>
46           <?php echo $album["titre"] ?>
47     <?php endif; ?>
48         </td>
49         <td class="action"><input type="text" name="ordre_<?php echo $id_album ?>" value="<?php echo isset($album["ordre"]) ? $album["ordre"] : 0 ?>" size="3" /></td>
50         <td class="action">
51     <?php if($album["permissions"]["editeur"]) : ?>
52         <a href="<?php echo $this->url("users/albums/edit", array("id" => $id_album)) ?>"
53            class="admin_link"
54            title="modifier cet album"><img src="<?php echo $this->out_url("icons/edit.gif") ?>" /></a>
55     <?php else : ?>
56         &nbsp;
57     <?php endif; ?>
58         </td>
59         <td class="action">
60     <?php if($album["permissions"]["admin"]) : ?>
61         <a href="<?php echo $this->url("users/albums/del", array("id" => $id_album)) ?>"
62            class="admin_link"
63            title="supprimer cet album"><img src="<?php echo $this->out_url("icons/del.gif") ?>"
64            onclick="return confirm('Supprimer cet album ?')"/></a>
65     <?php else : ?>
66         &nbsp;
67     <?php endif; ?>
68         </td>
69       </tr>
70     <?php endforeach; ?>
71     </table>
72     <ul class="form">
73       <li class="buttons">
74         <div class="form_buttons">
75           <input type="submit" value="Enregistrer l'ordre" />
76         </div>
77       </li>
78     </ul>
79   </fieldset>
80 </form>
81
82 <?php $items = "albums"; $legend = "albums"; require $this->out_file("views/navig.php"); ?>
83
84 <?php else : ?>
85 <p>Aucun album pour le moment</p>
86 <?php endif; ?>