]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | ||
1bb7bdc8 | 3 | {% block title %}{{ entry.title|striptags|raw }} ({{ entry.domainName|removeWww }}){% endblock %} |
53e12188 | 4 | |
0d42217e JB |
5 | {% block body_class %}entry{% endblock %} |
6 | ||
53e12188 | 7 | {% block menu %} |
fcb3faf1 AD |
8 | <div class="progress"> |
9 | <div class="determinate"></div> | |
10 | </div> | |
b17874a7 AD |
11 | <nav class="hide-on-large-only"> |
12 | <div class="nav-wrapper cyan darken-1"> | |
13 | <ul> | |
96e43980 NL |
14 | <li> |
15 | <a href="#" data-activates="slide-out" class="button-collapse"> | |
16 | <i class="material-icons">menu</i> | |
17 | </a> | |
18 | </li> | |
b17874a7 | 19 | <li> |
fad31615 | 20 | <a class="waves-effect" href="{{ path('homepage') }}"> |
5ecdfcd0 | 21 | <i class="material-icons">exit_to_app</i> |
b17874a7 AD |
22 | </a> |
23 | </li> | |
24 | </ul> | |
25 | <ul class="right"> | |
26 | <li> | |
0d42217e | 27 | <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_read'|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> |
91826e3c | 28 | <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i> |
b17874a7 AD |
29 | </a> |
30 | </li> | |
31 | <li> | |
519ba0b5 | 32 | <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav"> |
79efca1e | 33 | <i class="material-icons small">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i> |
b17874a7 AD |
34 | </a> |
35 | </li> | |
b17874a7 AD |
36 | </ul> |
37 | </div> | |
38 | </nav> | |
9948d899 | 39 | <ul id="slide-out" class="collapsible side-nav fixed reader-mode" data-collapsible="accordion"> |
b17874a7 | 40 | <li class="bold border-bottom hide-on-med-and-down"> |
fad31615 | 41 | <a class="waves-effect collapsible-header" href="{{ path('homepage') }}"> |
5ecdfcd0 | 42 | <i class="material-icons small">exit_to_app</i> |
0d42217e | 43 | <span>{{ 'entry.view.left_menu.back_to_homepage'|trans }}</span> |
53e12188 AD |
44 | </a> |
45 | <div class="collapsible-body"></div> | |
46 | </li> | |
47 | ||
9cc6bd87 | 48 | <li class="bold border-bottom hide-on-med-and-down"> |
94f2057f | 49 | <a class="waves-effect collapsible-header original" href="{{ entry.url|e }}" target="_blank"> |
46d78f87 | 50 | <i class="material-icons small">link</i> |
0d42217e | 51 | <span>{{ 'entry.view.left_menu.view_original_article'|trans }}</span> |
9cc6bd87 NL |
52 | </a> |
53 | <div class="collapsible-body"></div> | |
54 | </li> | |
55 | ||
df30af69 | 56 | <li class="bold"> |
0d42217e | 57 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload"> |
5ecdfcd0 | 58 | <i class="material-icons small">autorenew</i> |
0d42217e | 59 | <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span> |
831b02aa JB |
60 | </a> |
61 | <div class="collapsible-body"></div> | |
62 | </li> | |
63 | ||
458beef0 NL |
64 | {% set markAsReadLabel = 'entry.view.left_menu.set_as_unread' %} |
65 | {% if entry.isArchived == 0 %} | |
66 | {% set markAsReadLabel = 'entry.view.left_menu.set_as_read' %} | |
67 | {% endif %} | |
68 | ||
b17874a7 | 69 | <li class="bold hide-on-med-and-down"> |
94f2057f | 70 | <a class="waves-effect collapsible-header markasread" title="{{ markAsReadLabel|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> |
5ecdfcd0 | 71 | <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i> |
458beef0 | 72 | <span>{{ markAsReadLabel|trans }}</span> |
53e12188 AD |
73 | </a> |
74 | <div class="collapsible-body"></div> | |
75 | </li> | |
76 | ||
b17874a7 | 77 | <li class="bold hide-on-med-and-down"> |
94f2057f | 78 | <a class="waves-effect collapsible-header favorite" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav"> |
79efca1e | 79 | <i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i> |
519ba0b5 | 80 | <span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span> |
53e12188 AD |
81 | </a> |
82 | <div class="collapsible-body"></div> | |
83 | </li> | |
df30af69 | 84 | <li class="bold border-bottom"> |
fa0f5ee1 | 85 | <a class="waves-effect collapsible-header delete" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> |
5ecdfcd0 | 86 | <i class="material-icons small">delete</i> |
0d42217e | 87 | <span>{{ 'entry.view.left_menu.delete'|trans }}</span> |
53e12188 AD |
88 | </a> |
89 | <div class="collapsible-body"></div> | |
90 | </li> | |
91 | ||
df30af69 | 92 | <li class="bold border-bottom"> |
a754db33 | 93 | <a class="waves-effect collapsible-header" id="nav-btn-add-tag"> |
5ecdfcd0 | 94 | <i class="material-icons small">label_outline</i> |
0d42217e | 95 | <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span> |
a754db33 NL |
96 | </a> |
97 | <div class="collapsible-body"></div> | |
98 | </li> | |
99 | ||
53e12188 AD |
100 | <li class="bold"> |
101 | <a class="waves-effect collapsible-header"> | |
5ecdfcd0 | 102 | <i class="material-icons small">share</i> |
0d42217e | 103 | <span>{{ 'entry.view.left_menu.share_content'|trans }}</span> |
53e12188 AD |
104 | </a> |
105 | <div class="collapsible-body"> | |
106 | <ul> | |
d0545b6b | 107 | {% if craue_setting('share_public') %} |
f3d0cb91 | 108 | <li> |
0c7f1ba7 | 109 | <a href="{{ path('share', {'id': entry.id }) }}" target="_blank" title="{{ 'entry.view.left_menu.public_link'|trans }}" class="tool icon-eye"> |
3377c938 | 110 | <span>{{ 'entry.view.left_menu.public_link'|trans }}</span> |
f3d0cb91 NL |
111 | </a> |
112 | </li> | |
f1be7af4 | 113 | <li> |
0c7f1ba7 | 114 | <a href="{{ path('delete_share', {'id': entry.id }) }}" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}" class="tool icon-no-eye"> |
f1be7af4 NL |
115 | <span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span> |
116 | </a> | |
117 | </li> | |
f3d0cb91 | 118 | {% endif %} |
daa2b7e7 JB |
119 | {% if craue_setting('share_twitter') %} |
120 | <li> | |
1bb7bdc8 | 121 | <a href="https://twitter.com/home?status={{entry.title|striptags|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool icon-twitter" title="twitter"> |
daa2b7e7 JB |
122 | <span>twitter</span> |
123 | </a> | |
124 | </li> | |
125 | {% endif %} | |
126 | {% if craue_setting('share_shaarli') %} | |
127 | <li> | |
64f81bc3 | 128 | <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}" target="_blank" title="shaarli" class="tool icon-image shaarli"> |
46d78f87 | 129 | <span>shaarli</span> |
daa2b7e7 JB |
130 | </a> |
131 | </li> | |
132 | {% endif %} | |
fb9f100e F |
133 | {% if craue_setting('share_scuttle') %} |
134 | <li> | |
34806fab | 135 | <a href="{{ craue_setting('scuttle_url') }}/bookmarks.php?action=add&address={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}" target="_blank" title="scuttle" class="tool icon-image scuttle"> |
fb9f100e F |
136 | <span>scuttle</span> |
137 | </a> | |
138 | </li> | |
5e9009ce | 139 | {% endif %} |
daa2b7e7 JB |
140 | {% if craue_setting('share_diaspora') %} |
141 | <li> | |
64f81bc3 | 142 | <a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool icon-image diaspora" title="diaspora"> |
46d78f87 | 143 | <span>diaspora*</span> |
daa2b7e7 JB |
144 | </a> |
145 | </li> | |
146 | {% endif %} | |
8a9604aa NL |
147 | {% if craue_setting('share_unmark') %} |
148 | <li> | |
64f81bc3 | 149 | <a href="{{ craue_setting('unmark_url') }}/mark/add?url={{ entry.url|url_encode }}&title={{entry.title|striptags|url_encode}}&v=6" target="_blank" class="tool icon-image unmark" title="unmark"> |
8a9604aa NL |
150 | <span>unmark.it</span> |
151 | </a> | |
152 | </li> | |
153 | {% endif %} | |
daa2b7e7 JB |
154 | {% if craue_setting('carrot') %} |
155 | <li> | |
64f81bc3 | 156 | <a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}" target="_blank" title="carrot" class="tool icon-image carrot"> |
46d78f87 | 157 | <span>Carrot</span> |
daa2b7e7 JB |
158 | </a> |
159 | </li> | |
160 | {% endif %} | |
161 | {% if craue_setting('share_mail') %} | |
162 | <li> | |
64f81bc3 TC |
163 | <a href="mailto:?subject={{ entry.title|striptags|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" title="{{ 'entry.view.left_menu.share_email_label'|trans }}" class="tool icon"> |
164 | <i class="material-icons vertical-align-middle">mail</i> | |
0d42217e | 165 | <span>{{ 'entry.view.left_menu.share_email_label'|trans }}</span> |
daa2b7e7 JB |
166 | </a> |
167 | </li> | |
168 | {% endif %} | |
53e12188 AD |
169 | </ul> |
170 | </div> | |
171 | </li> | |
172 | ||
5847dd35 TC |
173 | {#{% if craue_setting('groups') %}#} |
174 | <li class="bold border-bottom hide-on-med-and-down"> | |
175 | <a class="waves-effect groups-button" onclick="$('#groups-modal').openModal();" title="{{ 'entry.view.left_menu.group'|trans }}"> | |
176 | <i class="material-icons small">group</i> | |
177 | <span>{{ 'entry.view.left_menu.groups'|trans }}</span> | |
178 | </a> | |
179 | </li> | |
180 | {#{% endif %}#} | |
181 | ||
cb48a569 NL |
182 | {% if craue_setting('show_printlink') %} |
183 | <li class="bold border-bottom hide-on-med-and-down"> | |
184 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.print'|trans }}" href="javascript: window.print();"> | |
5ecdfcd0 | 185 | <i class="material-icons small">print</i> |
cb48a569 NL |
186 | <span>{{ 'entry.view.left_menu.print'|trans }}</span> |
187 | </a> | |
188 | <div class="collapsible-body"></div> | |
189 | </li> | |
190 | {% endif %} | |
191 | ||
53e12188 AD |
192 | <li class="bold"> |
193 | <a class="waves-effect collapsible-header"> | |
5ecdfcd0 | 194 | <i class="material-icons small">file_download</i> |
5f82fc23 | 195 | <span>{{ 'entry.view.left_menu.export'|trans }}</span> |
53e12188 AD |
196 | </a> |
197 | <div class="collapsible-body"> | |
198 | <ul> | |
63e40f2d JB |
199 | {% if craue_setting('export_epub') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'epub' }) }}" title="Generate ePub file">EPUB</a></li>{% endif %} |
200 | {% if craue_setting('export_mobi') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'mobi' }) }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | |
201 | {% if craue_setting('export_pdf') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'pdf' }) }}" title="Generate PDF file">PDF</a></li>{% endif %} | |
202 | {% if craue_setting('export_csv') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'csv' }) }}" title="Generate CSV file">CSV</a></li>{% endif %} | |
203 | {% if craue_setting('export_json') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'json' }) }}" title="Generate JSON file">JSON</a></li>{% endif %} | |
6c08fb68 | 204 | {% if craue_setting('export_txt') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'txt' }) }}" title="Generate TXT file">TXT</a></li>{% endif %} |
63e40f2d | 205 | {% if craue_setting('export_xml') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'xml' }) }}" title="Generate XML file">XML</a></li>{% endif %} |
53e12188 AD |
206 | </ul> |
207 | </div> | |
208 | </li> | |
209 | ||
210 | <li class="bold"> | |
0d42217e | 211 | <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}"> |
5ecdfcd0 | 212 | <i class="material-icons small">error</i> |
0d42217e | 213 | <span>{{ 'entry.view.left_menu.problem.label'|trans }}</span> |
53e12188 AD |
214 | </a> |
215 | <div class="collapsible-body"></div> | |
216 | </li> | |
217 | ||
218 | </ul> | |
219 | ||
53e12188 AD |
220 | {% endblock %} |
221 | ||
222 | {% block content %} | |
223 | <div id="article"> | |
224 | <header class="mbm"> | |
1bb7bdc8 | 225 | <h1>{{ entry.title|striptags|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> |
53e12188 | 226 | </header> |
a754db33 | 227 | <aside> |
4c6ee89c TC |
228 | <div class="tools"> |
229 | <ul class="stats"> | |
7b0b3622 | 230 | <li> |
4c6ee89c | 231 | {% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %} |
7b0b3622 | 232 | </li> |
4c6ee89c TC |
233 | <li> |
234 | <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> | |
235 | {{ entry.createdAt|date('Y-m-d H:i') }} | |
236 | </li> | |
237 | {% if entry.publishedAt is not null %} | |
238 | <li> | |
239 | <i class="material-icons" title="{{ 'entry.view.published_at'|trans }}">create</i> | |
240 | {{ entry.publishedAt|date('Y-m-d H:i') }} | |
241 | </li> | |
242 | {% endif %} | |
243 | {% if entry.publishedBy is not empty %} | |
244 | <li> | |
245 | <i class="material-icons" title="{{ 'entry.view.published_by'|trans }}">person</i> | |
246 | {% for author in entry.publishedBy %} | |
247 | {{ author }}{% if not loop.last %}, {% endif %} | |
248 | {% endfor %} | |
249 | </li> | |
250 | {% endif %} | |
251 | <li> | |
252 | <i class="material-icons link">link</i> | |
253 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|striptags }}" class="tool"> | |
254 | {{ entry.domainName|removeWww }} | |
255 | </a> | |
256 | </li> | |
257 | <li> | |
258 | <i class="material-icons link">comment</i> | |
259 | {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} | |
260 | </li> | |
261 | </ul> | |
262 | <ul class="tags"> | |
34aa06a9 | 263 | {% for tag in entry.tags %} |
4c6ee89c | 264 | <li class="chip"> |
fa0f5ee1 JB |
265 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> |
266 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | |
267 | <i class="material-icons vertical-align-middle">delete</i> | |
268 | </a> | |
4c6ee89c | 269 | </li> |
34aa06a9 | 270 | {% endfor %} |
4c6ee89c TC |
271 | </ul> |
272 | </div> | |
a754db33 NL |
273 | |
274 | <div class="input-field nav-panel-add-tag" style="display: none"> | |
275 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | |
276 | </div> | |
277 | ||
c6cbe75b | 278 | {% if entry.previewPicture is not null %} |
1bb7bdc8 | 279 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|e('html_attr') }}" /></div> |
c6cbe75b NL |
280 | {% endif %} |
281 | ||
53e12188 AD |
282 | </aside> |
283 | <article> | |
284 | {{ entry.content | raw }} | |
285 | </article> | |
6787afbe NL |
286 | |
287 | <div class="fixed-action-btn horizontal click-to-toggle hide-on-large-only"> | |
288 | <a class="btn-floating btn-large"> | |
289 | <i class="material-icons">menu</i> | |
290 | </a> | |
291 | <ul> | |
292 | <li><a class="btn-floating" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">done</i></a></li> | |
293 | <li><a class="btn-floating" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">star_outline</i></a></li> | |
fa0f5ee1 | 294 | <li><a class="btn-floating" href="{{ path('delete_entry', { 'id': entry.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')"><i class="material-icons">delete</i></a></li> |
6787afbe NL |
295 | </ul> |
296 | </div> | |
53e12188 | 297 | </div> |
2b6e65a5 | 298 | |
5847dd35 TC |
299 | {{ render(controller( "WallabagCoreBundle:Entry:GroupShare", { 'entry': entry.id } )) }} |
300 | ||
5ecdfcd0 TC |
301 | <script id="annotationroutes" type="application/json"> |
302 | { | |
303 | "prefix": "", | |
304 | "urls": { | |
305 | "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}", | |
306 | "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}", | |
307 | "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}", | |
308 | "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}" | |
309 | }, | |
310 | "entryId": "{{ entry.id }}" | |
311 | }</script> | |
2b6e65a5 | 312 | |
53e12188 AD |
313 | {% endblock %} |
314 | ||
315 | {% block footer %} | |
c2257428 | 316 | {% endblock %} |