]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Display sort links only if there is at least 2 articles in current list 205/head
authorNumEricR <eric.github@gmail.com>
Thu, 5 Sep 2013 20:16:36 +0000 (22:16 +0200)
committerNumEricR <eric.github@gmail.com>
Thu, 5 Sep 2013 20:16:36 +0000 (22:16 +0200)
tpl/home.twig

index f51c34f235d5ab91e80f250d2b44fc899e8fe3d1..f44e040e1e3881db6e176f5d9153dad1bad1ad39 100644 (file)
 {% 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 }}