source: trunk/web/app/out/dist/content/e_news.php @ 1

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

import initial

File size: 2.4 KB
RevLine 
[1]1<div class="bloc">
2<h2>News</h2>
3  <div class="bloc_content">
4<?php if($env->out["news"]["list"] || $_GET[$env->param("categorie")]) : ?>
5
6<?php if($env->out["categories"]["list"]) : ?>
7  <div class="filtre">
8    Afficher les news pour la cat&eacute;gorie :
9    <select onchange="document.location=this.options[this.selectedIndex].value;">
10      <option value="<?= $env->url(array("e" => "news")) ?>">Toutes les cat&eacute;gories</option>
11      <option value="<?= $env->url(array("e" => "news", "categorie" => "")) ?>"
12              <?= isset($_GET[$env->param("categorie")]) && strlen($_GET[$env->param("categorie")]) == 0 ?
13                    "selected" : "" ?>>Sans cat&eacute;gorie</option>
14<?php foreach($env->out["categories"]["list"] as $id_categorie => $categorie) : ?>
15      <option value="<?= $env->url(array("e" => "news", "categorie" => $id_categorie)) ?>"
16              <?= $_GET[$env->param("categorie")] == $id_categorie ? "selected" : "" ?>>
17        <?= $categorie["titre"] ?>
18      </option>
19<?php endforeach; ?>
20    </select>
21  </div>
22<?php endif; ?>
23
24<?php endif; ?>
25
26<?php if($env->out["news"]["list"]) : ?>
27
28<?php foreach($env->out["news"]["list"] as $id_news => $news) : ?>
29<div class="news">
30  <div class="news_categorie">
31<?php if($news["categorie_icone"] || $news["categorie_titre"]) : ?>
32    <a href="<?= $env->url(array("e" => "accueil", "categorie" => $news["categorie"])) ?>">
33<?php if($news["categorie_icone"]) : ?>
34      <img src="<?= $news["categorie_icone"] ?>" alt="<?= $news["categorie_titre"] ?>" />
35<?php else : ?>
36      <?= $news["categorie_titre"] ?>
37<?php endif; ?>
38    </a>
39<?php else : ?>
40    &nbsp;
41<?php endif; ?>
42
43  </div>
44  <div class="news_main">
45    <h3><a href="<?= $env->url(array("e" => "content", "id" => $id_news)) ?>"><?= $news["titre"] ?></a></h3>
46    <p class="by">Par <?= $news["auteur"] ?> - <?= $news["date_publication"] ?></p>
47    <div class="news_contenu">
48    <?= $env->data->html($news["contenu"]) ?>
49    </div>
50  </div>
51  <div class="clear"><!-- --></div>
52</div>
53<?php endforeach; ?>
54
55<div class="navig">
56<?php
57
58  echo navig
59  ( $env->start,
60    $env->out["news"]["total"],
61    $env->config("max_list"),
62    $_SERVER["REQUEST_URI"],
63    $env->param("start"),
64         " news"
65  );
66
67?>
68</div>
69<?php else : ?>
70<?php if($_GET[$env->param("categorie")]) : ?>
71  <p>Aucune news dans cette cat&eacute;gorie</p>
72<?php endif; ?>
73<?php endif; ?>
74  </div>
75</div>
Note: See TracBrowser for help on using the repository browser.