X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=themes%2Fdefault%2Fhome.twig;h=a320cc7f0433c5d5062142e128ce723c27b2038a;hb=7f8f8271e49a2834a87012ea838099c8b46cf63f;hp=21013ec816c9a127b085fc7e74163cd22a77d20b;hpb=d0a599bbae7f64a15680e13faf009107f5fcb8fc;p=github%2Fwallabag%2Fwallabag.git diff --git a/themes/default/home.twig b/themes/default/home.twig old mode 100644 new mode 100755 index 21013ec8..a320cc7f --- a/themes/default/home.twig +++ b/themes/default/home.twig @@ -12,23 +12,60 @@ {% include '_menu.twig' %} {% endblock %} {% block precontent %} - {% if entries|length > 1 %} - - {% endif %} + +{% include '_sorting.twig' %} {% endblock %} {% block content %} - {% if entries is empty %} -

{% trans "No articles found." %}

+ + {% if includeImport %} + {% include '_import.twig' %} + {% endif %} + + {% if tag %} +

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

+ {% endif %} + + {% 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 searchterm is defined %}

{% trans %}No articles found for « {{ searchterm }} »{% endtrans %} + {% else %}

{% trans "No articles found" %}{% endif %} +

{% else %} {% block pager %} {% if nb_results > 1 %}
-
{{ nb_results }} {% trans "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' %} + {% trans "random" %}{% endif %} +
{{ page_links | raw }}
+ {% elseif nb_results == 1 %} +
+
+ {% 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 %}
+
{% endif %} {% endblock %} {% for entry in entries %} @@ -44,7 +81,28 @@

{{ entry.content|striptags|slice(0, 300) }}...

{% endfor %} - {% endif %} + {{ block('pager') }} - {% if view == 'home' %}{% if nb_results > 1 %}{% trans "mark all the entries as read" %}{% endif %}{% endif %} + {% if view == 'home' %}{% if nb_results > 1 %}

{% trans "Mark all the entries as read" %}

{% endif %}{% endif %} + {% if searchterm is defined %}{% trans "Tag these results as" %} {{ searchterm }}{% endif %}
+ + {% if searchterm is defined %}{% trans "Delete results matching" %} {{ searchterm }}{% endif %}
+ + {% if tag %}{% trans "Mark all articles from this tag as read" %}
{% endif %} + + {% 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 %} {% endblock %}