diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a8f6415..89e94a3 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -262,6 +262,7 @@ class Poche $tpl_vars = array( 'entries' => '', 'page_links' => '', + 'nb_results' => '', ); if (count($entries) > 0) { $this->pagination->set_total(count($entries)); @@ -269,6 +270,7 @@ class Poche $datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit()); $tpl_vars['entries'] = $datas; $tpl_vars['page_links'] = $page_links; + $tpl_vars['nb_results'] = count($entries); } Tools::logm('display ' . $view . ' view'); break; diff --git a/tpl/css/style.css b/tpl/css/style.css index 7633534..f07072a 100644 --- a/tpl/css/style.css +++ b/tpl/css/style.css @@ -98,6 +98,10 @@ a, a:hover, a:visited { #main #content .entrie { border-bottom: 1px dashed #222; } +/* First entry */ +#main #content .results + .entrie { + clear: both; +} #main .entrie .tools { list-style-type: none; @@ -189,11 +193,22 @@ a, a:hover, a:visited { } -/* Pagination */ -.pagination { - clear: both; +.results { + overflow: hidden; padding-bottom: 20px; padding-top: 10px; +} + +.nb-results { + float: left; + font-size: 0.9em; + line-height: 24px; + vertical-align: middle; +} + +/* Pagination */ +.pagination { + float: right; text-align: right; } .pagination a { diff --git a/tpl/home.twig b/tpl/home.twig index f51c34f..db4e088 100644 --- a/tpl/home.twig +++ b/tpl/home.twig @@ -18,10 +18,17 @@ {% endblock %} {% block content %} - {{ page_links | raw }} {% if entries is empty %}
{% else %} + {% block pager %} + {% if nb_results > 1 %} +