<?php
if (Request::param ('output', '') == 'rss') {
$this->renderHelper ('rss');
return;
}
?>
<?php $this -> partial ( 'aside_flux' ); ?>
<?php $this -> partial ( 'nav_menu' ); ?>
<?php
if (isset ($this->entryPaginator)) {
$items = $this->entryPaginator->items (true);
?>
< 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 - <?php echo timestamptodate ( time (), false ); ?> </ div >
<?php $display_today = false ; } ?>
<?php if ( $display_yesterday && $item -> isDay ( Days :: YESTERDAY )) { ?>
< div class = "day" > Hier - <?php echo timestamptodate ( time () - 86400 , false ); ?> </ 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 = "horizontal-list flux_header" >
<?php if ( ! login_is_conf ( $this -> conf ) || is_logged ()) { ?>
< li class = "item manage" >
<?php if ( ! $item -> isRead ()) { ?>
< a class = "read" href = " <?php echo _url ( 'entry' , 'read' , 'id' , $item -> id (), 'is_read' , 1 ); ?> " > </ a >
<?php } else { ?>
< a class = "read" href = " <?php echo _url ( 'entry' , 'read' , 'id' , $item -> id (), 'is_read' , 0 ); ?> " > </ a >
<?php } ?>
<?php if ( ! $item -> isFavorite ()) { ?>
< a class = "bookmark" href = " <?php echo _url ( 'entry' , 'bookmark' , 'id' , $item -> id (), 'is_favorite' , 1 ); ?> " > </ a >
<?php } else { ?>
< a class = "bookmark" href = " <?php echo _url ( 'entry' , 'bookmark' , 'id' , $item -> id (), 'is_favorite' , 0 ); ?> " > </ a >
<?php } ?>
< / li >
<?php } ?>
<?php $feed = $item -> feed ( true ); ?>
< li class = "item website" >< a href = " <?php echo _url ( 'index' , 'index' , 'get' , 'f_' . $feed -> id ()); ?> " >< img class = "favicon" src = "http://g.etfv.co/ <?php echo $feed -> website (); ?> " alt = "" /> < span > <?php echo $feed -> name (); ?> </ span ></ a ></ li >
< li class = "item title" > <?php echo $item -> title (); ?> </ li >
< li class = "item date" > le <?php echo $item -> date (); ?> </ li >
< li class = "item link" >< a target = "_blank" href = " <?php echo $item -> link (); ?> " > </ a ></ li >
< / ul >
< div class = "flux_content" >
< div class = "content" >
< h1 class = "title" > <?php echo $item -> title (); ?> </ h1 >
<?php $author = $item -> author (); ?>
<?php echo $author != '' ? '<div class="author">Par <em>' . $author . '</em></div>' : '' ; ?>
<?php echo $item -> content (); ?>
< / div >
< ul class = "horizontal-list bottom" >
< li class = "item" >
<?php if ( $item -> notes () != '' ) { ?>
< i class = "icon i_note" ></ i > < a class = "note" href = " <?php echo _url ( 'entry' , 'note' , 'id' , $item -> id ()); ?> " > Modifier votre note</ a >
<?php } else { ?>
< i class = "icon i_note_empty" ></ i > < a class = "note" href = " <?php echo _url ( 'entry' , 'note' , 'id' , $item -> id ()); ?> " > Ajouter une note</ a >
<?php } ?>
< / li >
< li class = "item" >
< div class = "dropdown" >
< div id = "dropdown-share- <?php echo $item -> id (); ?> " class = "dropdown-target" ></ div >
< i class = "icon i_share" ></ i > < a class = "dropdown-toggle" href = "#dropdown-share- <?php echo $item -> id (); ?> " > Partager</ a >
< ul class = "dropdown-menu" >
< li class = "dropdown-close" > < a href = "#close" > < i class = "icon i_close" > < / i > < / a > < / li >
< li class = "item" >< a href = "mailto:?subject= <?php echo $item -> title (); ?> &body=J'ai trouvé cet article intéressant, tu peux le lire à cette adresse : <?php echo urlencode ( $item -> link ()); ?> " > Par mail</ a ></ li >
< / ul >
< / div >
< / li >
< / ul >
< / div >
< / div >
<?php } ?>
<?php $this -> entryPaginator -> render ( 'pagination.phtml' , 'page' ); ?>
< / div >
<?php } else { ?>
< div class = "alert" >
< span class = "alert-head" > Il n'y a aucun flux à afficher.< / span >
<?php if ( Session :: param ( 'mode' , 'all' ) == 'not_read' ) { ?>
< a class = "print_all" href = " <?php echo _url ( 'index' , 'changeMode' , 'mode' , 'all' ); ?> " > Afficher tous les articles ?</ a >
<?php } ?>
< / div >
<?php } ?>