fix little problems and bring previous features to all themes

This commit is contained in:
Thomas Citharel 2015-03-13 17:08:14 +01:00
parent f76dab12c9
commit ae27d0ffca
4 changed files with 40 additions and 15 deletions

View file

@ -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':

View file

@ -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 %}
@ -91,20 +91,20 @@
{% 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 %}

View file

@ -151,7 +151,7 @@ a:visited {
text-indent: -9999px;
}
.random {
.icon-random {
display: inline-block;
width: 16px;
height: 16px;

View file

@ -25,22 +25,47 @@
<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 %}