diff options
| author | 2013-04-29 00:57:08 +0200 | |
|---|---|---|
| committer | 2013-04-29 00:57:08 +0200 | |
| commit | 9820345eec3958e9df1b1f8daaaa776de0d333e5 (patch) | |
| tree | e85c0890ca77be78c858e0c3f0e4721f779cb28f /app/views | |
| parent | 00bac232e0976a2ca09e7c4e73956cd802176480 (diff) | |
Revue de code pour la récupération des articles : ATTENTION GROS CHANGEMENTS, aucune garantie de stabilité et possibles régressions. La recherche dans le contenu des articles fonctionnent et possibilité de rechercher des tags
Diffstat (limited to 'app/views')
| -rwxr-xr-x | app/views/helpers/pagination.phtml | 29 | ||||
| -rw-r--r-- | app/views/index/index.phtml | 9 |
2 files changed, 7 insertions, 31 deletions
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index d5428d304..f029f281a 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -2,36 +2,15 @@ $c = Request::controllerName (); $a = Request::actionName (); $params = Request::params (); - - $conf = new RSSConfiguration (); - $order = Session::param ('order', $conf->sortOrder ()); - if ($order == 'low_to_high') { - $first_link = Translate::t ('newer'); - $second_link = Translate::t ('older'); - } else { - $first_link = Translate::t ('older'); - $second_link = Translate::t ('newer'); - } ?> <ul class="pagination"> - <li class="item pager-previous"> - <?php if ($this->currentPage > 1) { ?> - <?php $params[$getteur] = $this->currentPage - 1; ?> - <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo $first_link ?></a> - <?php } else { ?> - - <?php } ?> - </li> - - <li class="item pager-current">page <?php echo $this->currentPage; ?> / <?php echo $this->nbPage; ?></li> - <li class="item pager-next"> - <?php if ($this->currentPage < $this->nbPage) { ?> - <?php $params[$getteur] = $this->currentPage + 1; ?> - <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $second_link; ?> ›</a> + <?php if ($this->next != '') { ?> + <?php $params[$getteur] = $this->next; ?> + <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t ('load_more'); ?></a> <?php } else { ?> - + <?php echo Translate::t ('nothing_to_load'); ?> <?php } ?> </li> </ul> diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index c9be7169d..c39775fd7 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -10,8 +10,8 @@ if (Request::param ('output', '') == 'rss') { <?php $this->partial ('nav_menu'); ?> <?php -if (isset ($this->entryPaginator)) { - $items = $this->entryPaginator->items (true); +if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) { + $items = $this->entryPaginator->items (); ?> <div id="stream"> <?php @@ -111,13 +111,10 @@ if (isset ($this->entryPaginator)) { </div> <?php } ?> - <?php $this->entryPaginator->render ('pagination.phtml', 'page'); ?> + <?php $this->entryPaginator->render ('pagination.phtml', 'next'); ?> </div> <?php } else { ?> <div class="alert alert-warn"> <span class="alert-head"><?php echo Translate::t ('no_feed_to_display'); ?></span> - <?php if (Session::param ('mode', 'all') == 'not_read') { ?> - <a class="print_all" href="<?php echo _url ('index', 'changeMode', 'mode', 'all'); ?>"><?php echo Translate::t ('show_all_articles'); ?></a> - <?php } ?> </div> <?php } ?> |
