source: branches/rsr.v5.1/web/app/out/dist/content/set_boxes/e_boxes.php @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 2.7 KB
Line 
1<h2>Les blocs</h2>
2<div class="bloc_content">
3
4<?php if($env->out["emplacements"]) : ?>
5  <div class="filtre">
6    Afficher les blocs pour l'emplacement :
7    <select onchange="document.location=this.options[this.selectedIndex].value;">
8      <option value="<?= $env->url(array("e" => "set_boxes")) ?>">Tous</option>
9      <option value="<?= $env->url(array("e" => "set_boxes", "categorie" => "")) ?>"
10              <?= isset($_GET[$env->param("categorie")]) && strlen($_GET[$env->param("categorie")]) == 0 ?
11                    "selected" : "" ?>>Aucun</option>
12<?php foreach($env->out["emplacements"] as $id_emplacement => $emplacement) : ?>
13      <option value="<?= $env->url(array("e" => "set_boxes", "categorie" => $id_emplacement)) ?>"
14              <?= $_GET[$env->param("categorie")] == $id_emplacement ? "selected" : "" ?>>
15        <?= $emplacement["intitule"] ?>
16      </option>
17<?php endforeach; ?>
18    </select>
19  </div>
20<?php endif; ?>
21
22  <ul>
23    <li><a href="<?= $env->url(array("e" => "set_boxes", "action" => "add_box")) ?>">Nouveau bloc</a></li>
24  </ul>
25
26<?php if($env->out["boxes"]["list"]) : ?>
27
28<br />
29<form name="blocs_form" action="<?= $env->url(array("e" => "set_boxes", "categorie" => $_GET[$env->param("categorie")])) ?>" method="post">
30<table class="admin">
31  <tr>
32    <th>id</th>
33    <th>intitul&eacute;</th>
34    <th>nom</th>
35    <th>fichier</th>
36    <th>ordre</th>
37    <th colspan="2">actions</th>
38  </tr>
39<?php foreach($env->out["boxes"]["list"] as $id_box => $box) : ?>
40  <tr class="hl">
41    <td><strong><?= $id_box ?></strong></td>
42    <td><?= $box["titre"] ?></td>
43    <td><?= $box["nom"] ?></td>
44    <td><?= $box["description"] ?></td>
45    <td align="center"><input type="text" size="3" name="ordre<?= $id_box ?>" value="<?= $box["ordre"] ?>" /></td>
46    <td align="center">
47    <a href="<?= $env->url(array("e" => "set_boxes", "action" => "set_box", "id" => $id_box)) ?>"
48       class="admin_link"
49       title="modifier ce bloc"><img src="<?= $env->out_file("icons/edit.gif") ?>" /></a>
50    </td>
51    <td align="center">
52    <a href="<?= $env->url(array("e" => "set_boxes", "action" => "del_box", "id" => $id_box)) ?>"
53       class="admin_link"
54       title="supprimer ce bloc"
55       onclick="return confirm('supprimer ce bloc ?')"><img src="<?= $env->out_file("icons/del.gif") ?>" /></a>
56    </td>
57  </tr>
58<?php endforeach; ?>
59  <tr>
60    <td colspan="4"><!-- --></td>
61    <td align="center">
62      <input type="submit" value="enregistrer l'ordre" />
63    </td>
64    <td colspan="2"><!-- --></td>
65  </tr>
66</table>
67</form>
68<?php else : ?>
69<br />
70<?php if($_GET[$env->param("categorie")]) : ?>
71  <p>Aucun bloc pour le moment pour cet emplacement...</p>
72<?php else : ?>
73  <p>Aucun bloc pour le moment...</p>
74<?php endif; ?>
75<?php endif; ?>
76</div>
Note: See TracBrowser for help on using the repository browser.