mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
Add number of results next to pager
This commit is contained in:
parent
3eb049036e
commit
7f9f5281e5
@ -262,6 +262,7 @@ class Poche
|
|||||||
$tpl_vars = array(
|
$tpl_vars = array(
|
||||||
'entries' => '',
|
'entries' => '',
|
||||||
'page_links' => '',
|
'page_links' => '',
|
||||||
|
'nb_results' => '',
|
||||||
);
|
);
|
||||||
if (count($entries) > 0) {
|
if (count($entries) > 0) {
|
||||||
$this->pagination->set_total(count($entries));
|
$this->pagination->set_total(count($entries));
|
||||||
@ -269,6 +270,7 @@ class Poche
|
|||||||
$datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit());
|
$datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit());
|
||||||
$tpl_vars['entries'] = $datas;
|
$tpl_vars['entries'] = $datas;
|
||||||
$tpl_vars['page_links'] = $page_links;
|
$tpl_vars['page_links'] = $page_links;
|
||||||
|
$tpl_vars['nb_results'] = count($entries);
|
||||||
}
|
}
|
||||||
Tools::logm('display ' . $view . ' view');
|
Tools::logm('display ' . $view . ' view');
|
||||||
break;
|
break;
|
||||||
|
@ -98,6 +98,10 @@ a, a:hover, a:visited {
|
|||||||
#main #content .entrie {
|
#main #content .entrie {
|
||||||
border-bottom: 1px dashed #222;
|
border-bottom: 1px dashed #222;
|
||||||
}
|
}
|
||||||
|
/* First entry */
|
||||||
|
#main #content .results + .entrie {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
#main .entrie .tools {
|
#main .entrie .tools {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
@ -189,11 +193,22 @@ a, a:hover, a:visited {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Pagination */
|
.results {
|
||||||
.pagination {
|
overflow: hidden;
|
||||||
clear: both;
|
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nb-results {
|
||||||
|
float: left;
|
||||||
|
font-size: 0.9em;
|
||||||
|
line-height: 24px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pagination */
|
||||||
|
.pagination {
|
||||||
|
float: right;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.pagination a {
|
.pagination a {
|
||||||
|
@ -18,10 +18,17 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ page_links | raw }}
|
|
||||||
{% if entries is empty %}
|
{% if entries is empty %}
|
||||||
<div class="messages warning"><p>{% trans "No link available here!" %}</p></div>
|
<div class="messages warning"><p>{% trans "No link available here!" %}</p></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
{% block pager %}
|
||||||
|
{% if nb_results > 1 %}
|
||||||
|
<div class="results">
|
||||||
|
<div class="nb-results">{{ nb_results }} {% trans "results" %}</div>
|
||||||
|
{{ page_links | raw }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
{% for entry in entries %}
|
{% for entry in entries %}
|
||||||
<div id="entry-{{ entry.id|e }}" class="entrie">
|
<div id="entry-{{ entry.id|e }}" class="entrie">
|
||||||
<h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
|
<h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
|
||||||
@ -36,5 +43,5 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ page_links | raw }}
|
{{ block('pager') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user