]>
Commit | Line | Data |
---|---|---|
943ac3c7 NL |
1 | {% extends "layout.twig" %} |
2 | {% block title %} | |
3 | {% if view == 'fav' %} | |
4 | {% trans "favorites" %} | |
5 | {% elseif view == 'archive' %} | |
6 | {% trans "archive" %} | |
7 | {% else %} | |
8 | {% trans "unread" %} | |
9 | {% endif %} | |
10 | {% endblock %} | |
11 | {% block menu %} | |
12 | {% include '_menu.twig' %} | |
13 | {% endblock %} | |
14 | {% block content %} | |
fc52df06 MR |
15 | {% if tag %} |
16 | <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3> | |
17 | {% endif %} | |
f76dab12 TC |
18 | {% if entries is empty%} |
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" %} | |
ae27d0ff | 24 | {% elseif searchterm is defined %} {% trans %}No articles found for « {{ searchterm }} »{% endtrans %} |
f76dab12 TC |
25 | {% else %}{% trans "No articles found" %}{% endif %} |
26 | </p></div> | |
fc52df06 MR |
27 | {% else %} |
28 | <div> | |
29 | {% include '_display-mode.twig' %} | |
30 | {% include '_sorting.twig' %} | |
31 | </div> | |
32 | {% block pager %} | |
33 | {% if nb_results > 1 %} | |
34 | <div class="results"> | |
f76dab12 TC |
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" %} | |
ae27d0ff TC |
44 | {% elseif searchterm is defined %} |
45 | {{ nb_results }} {% trans %}articles found for « {{ searchterm }} »{% endtrans %} | |
f76dab12 TC |
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> | |
fc52df06 MR |
52 | {{ page_links | raw }} |
53 | </div> | |
d967a1fa | 54 | {% elseif nb_results == 1 %} |
d967a1fa | 55 | <div class="results"> |
f76dab12 TC |
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" %} | |
ae27d0ff | 61 | {% elseif searchterm is defined %}{% trans %}Only one result found for « {{ searchterm }} »{% endtrans %} |
f76dab12 | 62 | {% else %}{% trans "One article found" %}{% endif %}</div> |
d967a1fa | 63 | </div> |
fc52df06 MR |
64 | {% endif %} |
65 | {% endblock %} | |
4744cb0e | 66 | <div id="list-entries" class="list-entries"> |
fc52df06 | 67 | {% for entry in entries %} |
c9e6fec4 | 68 | <div id="entry-{{ entry.id|e }}" class="entrie"> |
fc52df06 | 69 | <h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2> |
6400371f | 70 | {% if entry.content| getReadingTime > 0 %} |
cc1f78a8 | 71 | <div class="estimatedTime"><span class="tool reading-time">{% trans "estimated reading time :" %} {{ entry.content| getReadingTime }} min</span></div> |
fc52df06 | 72 | {% else %} |
cc1f78a8 | 73 | <div class="estimatedTime"><span class="tool reading-time">{% trans "estimated reading time :" %} <small class="inferieur"><</small> 1 min</span></div> |
fc52df06 MR |
74 | {% endif %} |
75 | <ul class="tools links"> | |
76 | <li><a title="{% trans "Toggle mark as read" %}" class="tool icon-check icon {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li> | |
77 | <li><a title="{% trans "toggle favorite" %}" class="tool icon-star icon {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | |
78 | <li><a title="{% trans "delete" %}" class="tool delete icon-trash icon" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | |
6400371f | 79 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.url | e | getDomain }}</span></a></li> |
fc52df06 MR |
80 | </ul> |
81 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | |
82 | </div> | |
032e0ca1 | 83 | |
fc52df06 MR |
84 | {% endfor %} |
85 | </div> | |
2395a380 | 86 | {{ block('pager') }} |
cc1f78a8 | 87 | {% if view == 'home' %}{% if nb_results > 1 %}<p><a title="{% trans "Mark all the entries as read" %}" href="./?action=archive_all">{% trans "Mark all the entries as read" %}</a></p>{% endif %}{% endif %} |
dc69d3e8 | 88 | {% if searchterm is defined %}<a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">{% trans "Tag these results as" %} {{ searchterm }}</a>{% endif %}<br /> |
512e5e5b | 89 | |
90 | {% if searchterm is defined %}<a title="{% trans "Delete results matching" %} {{ searchterm }}" href="./?action=delete&search={{ searchterm }}">{% trans "Delete results matching" %} {{ searchterm }}</a>{% endif %}<br /> | |
91 | ||
13c7f9a4 | 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 %} |
93 | ||
fb9df0c2 | 94 | {% if tag %} |
5ea5310a TC |
95 | {% 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('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('PDF') == 1 %}<a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>{% endif %} | |
ae27d0ff | 98 | |
dc69d3e8 | 99 | {% elseif searchterm is defined %} |
5ea5310a TC |
100 | {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>{% endif %} |
101 | {% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>{% endif %} | |
102 | {% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>{% endif %} | |
ae27d0ff | 103 | |
fb9df0c2 | 104 | {% else %} |
5ea5310a TC |
105 | {% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>{% endif %} |
106 | {% 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 %} | |
107 | {% 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 %} | |
fc52df06 | 108 | {% endif %} |
dc69d3e8 | 109 | {% endif %} |
943ac3c7 | 110 | {% endblock %} |