]>
Commit | Line | Data |
---|---|---|
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 %} | |
15 | {% if tag %} | |
16 | <h3>{% trans "Tag" %}: <b>{{ tag.value }}</b></h3> | |
17 | {% endif %} | |
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" %} | |
24 | {% elseif searchterm is defined %} {% trans %}No articles found for « {{ searchterm }} »{% endtrans %} | |
25 | {% else %}{% trans "No articles found" %}{% endif %} | |
26 | </p></div> | |
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"> | |
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" %} | |
44 | {% elseif searchterm is defined %} | |
45 | {{ nb_results }} {% trans %}articles found for « {{ searchterm }} »{% endtrans %} | |
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> | |
52 | {{ page_links | raw }} | |
53 | </div> | |
54 | {% elseif nb_results == 1 %} | |
55 | <div class="results"> | |
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" %} | |
61 | {% elseif searchterm is defined %}{% trans %}Only one result found for « {{ searchterm }} »{% endtrans %} | |
62 | {% else %}{% trans "One article found" %}{% endif %}</div> | |
63 | </div> | |
64 | {% endif %} | |
65 | {% endblock %} | |
66 | <div id="list-entries" class="list-entries"> | |
67 | {% for entry in entries %} | |
68 | <div id="entry-{{ entry.id|e }}" class="entrie"> | |
69 | <h2><a href="index.php?view=view&id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2> | |
70 | {% if entry.content| getReadingTime > 0 %} | |
71 | <div class="estimatedTime"><span class="tool reading-time">{% trans "estimated reading time :" %} {{ entry.content| getReadingTime }} min</span></div> | |
72 | {% else %} | |
73 | <div class="estimatedTime"><span class="tool reading-time">{% trans "estimated reading time :" %} <small class="inferieur"><</small> 1 min</span></div> | |
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> | |
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> | |
80 | </ul> | |
81 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | |
82 | </div> | |
83 | ||
84 | {% endfor %} | |
85 | </div> | |
86 | {{ block('pager') }} | |
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 %} | |
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 /> | |
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 | ||
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 | ||
94 | {% if tag %} | |
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 %} | |
98 | ||
99 | {% elseif searchterm is defined %} | |
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 %} | |
103 | ||
104 | {% else %} | |
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 %} | |
108 | {% endif %} | |
109 | {% endif %} | |
110 | {% endblock %} |