From 7f9f5281e5fe6dd92c810f7945c7761ca17fd2e6 Mon Sep 17 00:00:00 2001 From: NumEricR Date: Wed, 28 Aug 2013 19:12:11 +0200 Subject: Add number of results next to pager --- tpl/css/style.css | 21 ++++++++++++++++++--- tpl/home.twig | 11 +++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'tpl') diff --git a/tpl/css/style.css b/tpl/css/style.css index 7633534c..f07072a7 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 f51c34f2..db4e0888 100644 --- a/tpl/home.twig +++ b/tpl/home.twig @@ -18,10 +18,17 @@ {% endblock %} {% block content %} - {{ page_links | raw }} {% if entries is empty %}

{% trans "No link available here!" %}

{% else %} + {% block pager %} + {% if nb_results > 1 %} +
+
{{ nb_results }} {% trans "results" %}
+ {{ page_links | raw }} +
+ {% endif %} + {% endblock %} {% for entry in entries %}

{{ entry.title|raw }}

@@ -36,5 +43,5 @@
{% endfor %} {% endif %} - {{ page_links | raw }} + {{ block('pager') }} {% endblock %} \ No newline at end of file -- cgit v1.2.3