diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-03-13 16:49:20 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-03-13 16:49:20 +0100 |
commit | f76dab12c9913e0bf4bafd8f59cccdb6bf395994 (patch) | |
tree | eed9ddd964b650b3f8696359b082c2a8cc5242c8 /themes/baggy | |
parent | ab87a7fe6934b5fa0f06964c67a27826774126b4 (diff) | |
download | wallabag-f76dab12c9913e0bf4bafd8f59cccdb6bf395994.tar.gz wallabag-f76dab12c9913e0bf4bafd8f59cccdb6bf395994.tar.zst wallabag-f76dab12c9913e0bf4bafd8f59cccdb6bf395994.zip |
fix for #1153, a couple of improvements and fixed bugs
Diffstat (limited to 'themes/baggy')
-rwxr-xr-x | themes/baggy/home.twig | 41 |
1 files changed, 35 insertions, 6 deletions
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 @@ | |||
15 | {% if tag %} | 15 | {% if tag %} |
16 | <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3> | 16 | <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3> |
17 | {% endif %} | 17 | {% endif %} |
18 | {% if entries is empty %} | 18 | {% if entries is empty%} |
19 | <div class="messages warning"><p>{% trans "No articles found." %}</p></div> | 19 | <div class="messages warning"><p> |
20 | {% if view == 'home' %}{% trans "No articles unread. Good job !" %} | ||
21 | {% elseif view == 'fav' %}{% trans "No articles favourited" %} | ||
22 | {% elseif view == 'archive' %}{% trans "No articles marked as read" %} | ||
23 | {% elseif view == 'tags' %}{% trans "No articles with this tag found" %} | ||
24 | {% elseif search_term is defined %} {% trans %}No articles found for « {{ search_term }} »{% endtrans %} | ||
25 | {% else %}{% trans "No articles found" %}{% endif %} | ||
26 | </p></div> | ||
20 | {% else %} | 27 | {% else %} |
21 | <div> | 28 | <div> |
22 | {% include '_display-mode.twig' %} | 29 | {% include '_display-mode.twig' %} |
@@ -25,15 +32,35 @@ | |||
25 | {% block pager %} | 32 | {% block pager %} |
26 | {% if nb_results > 1 %} | 33 | {% if nb_results > 1 %} |
27 | <div class="results"> | 34 | <div class="results"> |
28 | <div class="nb-results">{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %} <a href="?action=random" class="icon icon-random"><span> {% trans "random" %}</span></a></div> | 35 | <div class="nb-results"> |
36 | {% if view == 'home' %} | ||
37 | {{ nb_results }} {% trans "articles unread" %} | ||
38 | {% elseif view == 'fav' %} | ||
39 | {{ nb_results }} {% trans "articles favourited" %} | ||
40 | {% elseif view == 'archive' %} | ||
41 | {{ nb_results }} {% trans "articles marked as read" %} | ||
42 | {% elseif view == 'tag' %} | ||
43 | {{ nb_results }} {% trans "articles with this tag" %} | ||
44 | {% elseif search_term is defined %}{{ nb_results }} | ||
45 | {% trans %}articles found for « {{ search_term }} »{% endtrans %} | ||
46 | {% else %} | ||
47 | {{ nb_results }} {% trans "articles" %} | ||
48 | {% endif %} | ||
49 | {% if view == 'home' or view == 'fav' or view == 'archive' %} | ||
50 | <a href="?action=random&view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %} | ||
51 | </div> | ||
29 | {{ page_links | raw }} | 52 | {{ page_links | raw }} |
30 | </div> | 53 | </div> |
31 | {% elseif nb_results == 1 %} | 54 | {% elseif nb_results == 1 %} |
32 | {% if search_term is defined %} | ||
33 | <div class="results"> | 55 | <div class="results"> |
34 | <div class="nb-results">{% trans "Only one result found for " %} « {{ search_term }} »</div> | 56 | <div class="nb-results"> |
57 | {% if view == 'home' %}{% trans "Only one article unread. Way to go !" %} | ||
58 | {% elseif view == 'fav' %}{% trans "Just one article favourited" %} | ||
59 | {% elseif view == 'archive' %}{% trans "One article marked as read" %} | ||
60 | {% elseif view == 'tag' %}{% trans "One article with this tag" %} | ||
61 | {% elseif search_term is defined %}{% trans %}Only one result found for « {{ search_term }} »{% endtrans %} | ||
62 | {% else %}{% trans "One article found" %}{% endif %}</div> | ||
35 | </div> | 63 | </div> |
36 | {% endif %} | ||
37 | {% endif %} | 64 | {% endif %} |
38 | {% endblock %} | 65 | {% endblock %} |
39 | <div id="list-entries" class="list-entries"> | 66 | <div id="list-entries" class="list-entries"> |
@@ -64,6 +91,7 @@ | |||
64 | 91 | ||
65 | {% if tag %}<a title="{% trans "Mark all articles from this tag as read" %}" href="./?action=toggle_archive&tag_id={{ tag.id }}">{% trans "Mark all articles from this tag as read" %}</a><br />{% endif %} | 92 | {% if tag %}<a title="{% trans "Mark all articles from this tag as read" %}" href="./?action=toggle_archive&tag_id={{ tag.id }}">{% trans "Mark all articles from this tag as read" %}</a><br />{% endif %} |
66 | 93 | ||
94 | {% if entries is not empty %} | ||
67 | {% if tag %} | 95 | {% if tag %} |
68 | {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>{% endif %} | 96 | {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>{% endif %} |
69 | {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>{% endif %} | 97 | {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>{% endif %} |
@@ -77,5 +105,6 @@ | |||
77 | {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>{% endif %} | 105 | {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>{% endif %} |
78 | {% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>{% endif %} | 106 | {% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>{% endif %} |
79 | {% endif %} | 107 | {% endif %} |
108 | {% endif %} | ||
80 | {% endif %} | 109 | {% endif %} |
81 | {% endblock %} | 110 | {% endblock %} |