diff options
| author | 2013-03-14 19:05:22 +0100 | |
|---|---|---|
| committer | 2013-03-14 19:05:22 +0100 | |
| commit | d2c20395c0aa74f2e1c039b56dfda618415be617 (patch) | |
| tree | c604917a9aebe82d588377eed492b755bfa5bfee /app/views/index/index.phtml | |
| parent | 0df314fcb48aef6c885d2573a1e90b8cb5d0ee10 (diff) | |
Ajout d'indicateur de jour dans le flux d'articles + correction de bugs js liés à cet ajout et code mort
Diffstat (limited to 'app/views/index/index.phtml')
| -rw-r--r-- | app/views/index/index.phtml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index bccb6588b..6ecbfd72f 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -16,7 +16,23 @@ <?php if (!empty ($items)) { ?> <div id="stream"> + <?php + $display_today = true; + $display_yesterday = true; + $display_others = true; + ?> <?php foreach ($items as $item) { ?> + + <?php if ($display_today && $item->isDay (Days::TODAY)) { ?> + <div class="day">Aujourd'hui</div> + <?php $display_today = false; } ?> + <?php if ($display_yesterday && $item->isDay (Days::YESTERDAY)) { ?> + <div class="day">Hier</div> + <?php $display_yesterday = false; } ?> + <?php if ($display_others && $item->isDay (Days::BEFORE_YESTERDAY)) { ?> + <div class="day">À partir d'avant-hier</div> + <?php $display_others = false; } ?> + <div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>"> <ul class="flux_header"> <li class="item manage"> |
