plusieurs auteurs (maj controleur albums)
[mw_sourceml] / app / out / default / views / users / albums / list.php
index bd1ba9c..d7f45a1 100644 (file)
@@ -8,10 +8,15 @@
 
 <ul class="filters">
   <li>
+<?php
+
+  $url_params = array();
+
+?>
     <select onchange="document.location=this.options[this.selectedIndex].value;">
-      <option value="<?php echo $this->url("users/albums") ?>"<?php echo $_GET[$this->param("groupe")] == "0" ? " selected=\"selected\"" : "" ?>>Tous les groupes</option>
-      <?php foreach($this->out["groupes"]["list"] as $id_groupe => $groupe) : ?>
-      <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>
+      <option value="<?php echo $this->url("users/albums", $url_params) ?>"<?php echo $_GET[$this->param("groupe")] == "0" ? " selected=\"selected\"" : "" ?>>Tous les groupes</option>
+      <?php foreach($this->out["groupes"]["list"] as $id_groupe => $groupe) : $url_params["groupe"] = $id_groupe; ?>
+      <option value="<?php echo $this->url("users/albums", $url_params) ?>"<?php echo $_GET[$this->param("groupe")] == $id_groupe ? " selected=\"selected\"" : "" ?>><?php echo $groupe["nom"] ?></option>
       <?php endforeach; ?>
     </select>
   </li>
       <tr class="hl">
         <td>
     <?php if($album["reference"]) : ?>
-          <?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>
+          r&eacute;f&eacute;rence &raquo; <a href="<?php echo $album["reference"]["from"] ?>"><?php echo $album["reference"]["titre"] ?> (<?php echo $album["reference"]["auteur"] ?>)</a>
     <?php else : ?>
-          <?php echo $album["titre"] ?>
+          <a href="<?php echo $this->url("users/albums/edit", array("id" => $id_album)) ?>"><?php echo $album["titre"] ?></a>
+    <?php endif; ?>
+    <?php if($album["derivations"]) : ?>
+          <br />
+          <span class="small">
+            d&eacute;rive de &raquo;
+    <?php $n = 0; foreach($album["derivations"] as $derivation) : ?>
+            <?php echo $n ? ", " : "" ?><a href="<?php echo $album["from"] ?>"><?php echo $album["titre"] ?> (<?php echo $album["auteur"] ?>)</a>
+    <?php $n++; endforeach; ?>
+          </span>
     <?php endif; ?>
         </td>
         <td class="action"><input type="text" name="ordre_<?php echo $id_album ?>" value="<?php echo isset($album["ordre"]) ? $album["ordre"] : 0 ?>" size="3" /></td>
@@ -79,7 +93,7 @@
   </fieldset>
 </form>
 
-<?php $items = "albums"; $legend = "albums"; require $this->out_file("views/navig.php"); ?>
+<?php $items = "album"; $legend = "album"; require $this->out_file("views/navig.php"); ?>
 
 <?php else : ?>
 <p>Aucun album pour le moment</p>