]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix little problems and bring previous features to all themes
authorThomas Citharel <tcit@tcit.fr>
Fri, 13 Mar 2015 16:08:14 +0000 (17:08 +0100)
committerThomas Citharel <tcit@tcit.fr>
Fri, 13 Mar 2015 16:08:14 +0000 (17:08 +0100)
inc/poche/Poche.class.php
themes/baggy/home.twig
themes/default/css/style.css
themes/default/home.twig

index 1a5cbe6cc9231b635113adf668cf9f9e341a0888..b27dda6c220fb949670b306e3fc1288f17ed7b97 100755 (executable)
@@ -523,7 +523,7 @@ class Poche
                             $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' ));
                    $tpl_vars['page_links'] = $page_links;
                    $tpl_vars['nb_results'] = $count;
-                   $tpl_vars['search_term'] = $search;
+                   $tpl_vars['searchterm'] = $search;
                 }
                 break;
             case 'view':
index 5f097f3f7ab2249056f69a16bd975d2dc98895bb..84fc8e8bb3604184e607ddac741f8f62b6d67857 100755 (executable)
@@ -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 %}
             </p></div>
             {% 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 %}</div>
                      </div>
                     {% endif %}
 
             {% if tag %}<a title="{% trans "Mark all articles from this tag as read" %}" href="./?action=toggle_archive&amp;tag_id={{ tag.id }}">{% trans "Mark all articles from this tag as read" %}</a><br />{% endif %}
 
-            {% if entries is not empty %}
             {% if tag %}
             {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&amp;method=tag&amp;value={{ tag.value }}">{% trans "Download as ePub3" %}</a>{% endif %}
             {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&amp;method=tag&amp;value={{ tag.value }}">{% trans "Download as Mobi" %}</a>{% endif %}
             {% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&amp;method=tag&amp;value={{ tag.value }}">{% trans "Download as PDF" %}</a>{% endif %}
+
             {% elseif searchterm is defined %}
             {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&amp;method=search&amp;value={{ searchterm }}">{% trans "Download as ePub3" %}</a>{% endif %}
             {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&amp;method=search&amp;value={{ searchterm }}">{% trans "Download as Mobi" %}</a>{% endif %}
             {% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&amp;method=search&amp;value={{ searchterm }}">{% trans "Download as PDF" %}</a>{% endif %}
+
             {% else %}
             {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&amp;method=category&amp;value={{ view }}">{% trans "Download as ePub3" %}</a>{% endif %}
             {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&amp;method=category&amp;value={{ view }}">{% trans "Download as Mobi" %}</a>{% endif %}
             {% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&amp;method=category&amp;value={{ view }}">{% trans "Download as PDF" %}</a>{% endif %}
             {% endif %}
-            {% endif %}
 {% endif %}
 {% endblock %}
index 58d908ee3647046cd492a63af32d0df380b93496..9a681748e40c4becd0aa56115622ae9e8198668d 100755 (executable)
@@ -151,7 +151,7 @@ a:visited {
     text-indent: -9999px;
 }
 
-.random {
+.icon-random {
     display: inline-block;
     width: 16px;
     height: 16px;
index 8fe563972b0a369dc52f0fa8715b479ad37768cf..a320cc7f0433c5d5062142e128ce723c27b2038a 100755 (executable)
                 <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3>
             {% endif %}
 
-            {% if entries is empty %}
-            <div class="messages warning"><p>{% trans "No articles found." %}</p></div>
+            {% if entries is empty%}
+            {% if view == 'home' %}<div class="messages success"><p>{% trans "No articles unread. Good job !" %}
+            {% elseif view == 'fav' %}<div class="messages warning"><p>{% trans "No articles favourited" %}
+            {% elseif view == 'archive' %}<div class="messages warning"><p>{% trans "No articles marked as read" %}
+            {% elseif view == 'tags' %}<div class="messages warning"><p>{% trans "No articles with this tag found" %}
+            {% elseif searchterm is defined %}<div class="messages warning"><p>{% trans %}No articles found for « {{ searchterm }} »{% endtrans %}
+            {% else %}<div class="messages warning"><p>{% trans "No articles found" %}{% endif %}
+            </p></div>
             {% else %}
                 {% block pager %}
                     {% if nb_results > 1 %}
                 <div class="results">
-                    <div class="nb-results">{{ nb_results }} {% trans "results" %}{% if searchterm is defined %}{% trans " found for « " %} {{ searchterm }} »{% endif %}
-                    <a class="random" href="?action=random"><span>{% trans "random" %}</span></a></div>
+                    <div class="nb-results">
+                    {% 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 searchterm is defined %}{{ nb_results }}
+                        {% trans %}articles found for « {{ searchterm }} »{% endtrans %}
+                    {% else %}
+                        {{ nb_results }} {% trans "articles" %}
+                    {% endif %}
+                    {% if view == 'home' or view == 'fav' or view == 'archive' %}
+                    <a href="?action=random&amp;view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
+                    </div>
                         {{ page_links | raw }}
                 </div>
                     {% elseif nb_results == 1 %}
-                        {% if searchterm is defined %}
                      <div class="results">
-                        <div class="nb-results">{% trans "Only one result found for " %} « {{ searchterm }} »</div>
+                        <div class="nb-results">
+                        {% 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 searchterm is defined %}{% trans %}Only one result found for « {{ searchterm }} »{% endtrans %}
+                        {% else %}{% trans "One article found" %}{% endif %}</div>
                      </div>
-                        {% endif %}
                     {% endif %}
                 {% endblock %}
                 {% for entry in entries %}