From f76dab12c9913e0bf4bafd8f59cccdb6bf395994 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 13 Mar 2015 16:49:20 +0100 Subject: fix for #1153, a couple of improvements and fixed bugs --- themes/baggy/home.twig | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'themes') diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig index 93d2815b..5f097f3f 100755 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig @@ -15,8 +15,15 @@ {% if tag %}

{% trans "Tag" %}: {{ tag.value }}

{% endif %} - {% if entries is empty %} -

{% trans "No articles found." %}

+ {% if entries is empty%} +

+ {% if view == 'home' %}{% trans "No articles unread. Good job !" %} + {% elseif view == 'fav' %}{% trans "No articles favourited" %} + {% elseif view == 'archive' %}{% trans "No articles marked as read" %} + {% elseif view == 'tags' %}{% trans "No articles with this tag found" %} + {% elseif search_term is defined %} {% trans %}No articles found for « {{ search_term }} »{% endtrans %} + {% else %}{% trans "No articles found" %}{% endif %} +

{% else %}
{% include '_display-mode.twig' %} @@ -25,15 +32,35 @@ {% block pager %} {% if nb_results > 1 %}
-
{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %} {% trans "random" %}
+
+ {% if view == 'home' %} + {{ nb_results }} {% trans "articles unread" %} + {% elseif view == 'fav' %} + {{ nb_results }} {% trans "articles favourited" %} + {% elseif view == 'archive' %} + {{ nb_results }} {% trans "articles marked as read" %} + {% elseif view == 'tag' %} + {{ nb_results }} {% trans "articles with this tag" %} + {% elseif search_term is defined %}{{ nb_results }} + {% trans %}articles found for « {{ search_term }} »{% endtrans %} + {% else %} + {{ nb_results }} {% trans "articles" %} + {% endif %} + {% if view == 'home' or view == 'fav' or view == 'archive' %} + {% trans "random" %}{% endif %} +
{{ page_links | raw }}
{% elseif nb_results == 1 %} - {% if search_term is defined %}
-
{% trans "Only one result found for " %} « {{ search_term }} »
+
+ {% if view == 'home' %}{% trans "Only one article unread. Way to go !" %} + {% elseif view == 'fav' %}{% trans "Just one article favourited" %} + {% elseif view == 'archive' %}{% trans "One article marked as read" %} + {% elseif view == 'tag' %}{% trans "One article with this tag" %} + {% elseif search_term is defined %}{% trans %}Only one result found for « {{ search_term }} »{% endtrans %} + {% else %}{% trans "One article found" %}{% endif %}
- {% endif %} {% endif %} {% endblock %}
@@ -64,6 +91,7 @@ {% if tag %}{% trans "Mark all articles from this tag as read" %}
{% endif %} + {% if entries is not empty %} {% if tag %} {% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %} {% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %} @@ -77,5 +105,6 @@ {% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %} {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %} {% endif %} + {% endif %} {% endif %} {% endblock %} -- cgit v1.2.3