Display sort links only if there is at least 2 articles in current list

This commit is contained in:
NumEricR 2013-09-05 22:16:36 +02:00
parent 08a12b6dbb
commit 2edde7fe33
1 changed files with 2 additions and 0 deletions

View File

@ -12,10 +12,12 @@
{% include '_menu.twig' %}
{% endblock %}
{% block precontent %}
{% if entries|length > 1 %}
<ul id="sort">
<li><a href="./?sort=ia&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by date asc" %}" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li>
<li><a href="./?sort=ta&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/top.png" alt="{% trans "by title asc" %}" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td&amp;view={{ view }}"><img src="./tpl/img/{{ constant('THEME') }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li>
</ul>
{% endif %}
{% endblock %}
{% block content %}
{{ page_links | raw }}