diff options
Diffstat (limited to 'themes/default/home.twig')
-rwxr-xr-x[-rw-r--r--] | themes/default/home.twig | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/themes/default/home.twig b/themes/default/home.twig index 165fecc6..e6c781f5 100644..100755 --- a/themes/default/home.twig +++ b/themes/default/home.twig | |||
@@ -12,14 +12,15 @@ | |||
12 | {% include '_menu.twig' %} | 12 | {% include '_menu.twig' %} |
13 | {% endblock %} | 13 | {% endblock %} |
14 | {% block precontent %} | 14 | {% block precontent %} |
15 | {% if entries|length > 1 %} | 15 | |
16 | <ul id="sort"> | 16 | {% include '_sorting.twig' %} |
17 | <li><a href="./?sort=ia&view={{ view }}&id={{ id }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/top.png" alt="{% trans "by date asc" %}" title="{% trans "by date asc" %}" /></a> {% trans "by date" %} <a href="./?sort=id&view={{ view }}&id={{ id }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/down.png" alt="{% trans "by date desc" %}" title="{% trans "by date desc" %}" /></a></li> | ||
18 | <li><a href="./?sort=ta&view={{ view }}&id={{ id }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/top.png" alt="{% trans "by title asc" %}" title="{% trans "by title asc" %}" /></a> {% trans "by title" %} <a href="./?sort=td&view={{ view }}&id={{ id }}"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/down.png" alt="{% trans "by title desc" %}" title="{% trans "by title desc" %}" /></a></li> | ||
19 | </ul> | ||
20 | {% endif %} | ||
21 | {% endblock %} | 17 | {% endblock %} |
22 | {% block content %} | 18 | {% block content %} |
19 | |||
20 | {% if includeImport %} | ||
21 | {% include '_import.twig' %} | ||
22 | {% endif %} | ||
23 | |||
23 | {% if tag %} | 24 | {% if tag %} |
24 | <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3> | 25 | <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3> |
25 | {% endif %} | 26 | {% endif %} |
@@ -30,9 +31,15 @@ | |||
30 | {% block pager %} | 31 | {% block pager %} |
31 | {% if nb_results > 1 %} | 32 | {% if nb_results > 1 %} |
32 | <div class="results"> | 33 | <div class="results"> |
33 | <div class="nb-results">{{ nb_results }} {% trans "results" %}</div> | 34 | <div class="nb-results">{{ nb_results }} {% trans "results" %}{% if search_term is defined %}{% trans " found for « " %} {{ search_term }} »{% endif %}</div> |
34 | {{ page_links | raw }} | 35 | {{ page_links | raw }} |
35 | </div> | 36 | </div> |
37 | {% elseif nb_results == 1 %} | ||
38 | {% if search_term is defined %} | ||
39 | <div class="results"> | ||
40 | <div class="nb-results">{% trans "Only one result found for " %} « {{ search_term }} »</div> | ||
41 | </div> | ||
42 | {% endif %} | ||
36 | {% endif %} | 43 | {% endif %} |
37 | {% endblock %} | 44 | {% endblock %} |
38 | {% for entry in entries %} | 45 | {% for entry in entries %} |
@@ -48,7 +55,14 @@ | |||
48 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | 55 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> |
49 | </div> | 56 | </div> |
50 | {% endfor %} | 57 | {% endfor %} |
51 | {% endif %} | 58 | |
52 | {{ block('pager') }} | 59 | {{ block('pager') }} |
60 | |||
53 | {% if view == 'home' %}{% if nb_results > 1 %}<a title="{% trans "mark all the entries as read" %}" href="./?action=archive_all">{% trans "mark all the entries as read" %}</a>{% endif %}{% endif %} | 61 | {% if view == 'home' %}{% if nb_results > 1 %}<a title="{% trans "mark all the entries as read" %}" href="./?action=archive_all">{% trans "mark all the entries as read" %}</a>{% endif %}{% endif %} |
62 | |||
63 | {% if tag %}<a title="{% trans "Download the articles from this tag in an epub" %}" href="./?epub&method=tag&tag={{ tag.value }}">{% trans "Download the articles from this tag in an epub" %}</a> | ||
64 | {% elseif search_term is defined %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&search={{ search_term }}">{% trans "Download the articles from this search in an epub" %}</a> | ||
65 | {% else %}<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&category={{ view }}">{% trans "Download the articles from this category in an epub" %}</a>{% endif %} | ||
66 | |||
67 | {% endif %} | ||
54 | {% endblock %} | 68 | {% endblock %} |