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/baggy/home.twig') 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 From ae27d0ffca1c3a381226fed42adea66c3971fdde Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 13 Mar 2015 17:08:14 +0100 Subject: fix little problems and bring previous features to all themes --- themes/baggy/home.twig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'themes/baggy/home.twig') diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig index 5f097f3f..84fc8e8b 100755 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig @@ -21,7 +21,7 @@ {% 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 %} + {% elseif searchterm is defined %} {% trans %}No articles found for « {{ searchterm }} »{% endtrans %} {% else %}{% trans "No articles found" %}{% endif %}

{% else %} @@ -41,8 +41,8 @@ {{ 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 %} + {% elseif searchterm is defined %} + {{ nb_results }} {% trans %}articles found for « {{ searchterm }} »{% endtrans %} {% else %} {{ nb_results }} {% trans "articles" %} {% endif %} @@ -58,7 +58,7 @@ {% 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 %} + {% elseif searchterm is defined %}{% trans %}Only one result found for « {{ searchterm }} »{% endtrans %} {% else %}{% trans "One article found" %}{% endif %}
{% endif %} @@ -91,20 +91,20 @@ {% 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 %} {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %} + {% elseif searchterm is defined %} {% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %} {% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %} {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %} + {% else %} {% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %} {% 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 From 22a46267beef273f8602d569a22281af2207fdbe Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 6 Jun 2015 16:39:10 +0200 Subject: implemented lots of keyboard shortcuts --- themes/baggy/home.twig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'themes/baggy/home.twig') diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig index 84fc8e8b..e1b78a26 100755 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig @@ -107,4 +107,8 @@ {% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %} {% endif %} {% endif %} + + {% endblock %} -- cgit v1.2.3