]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | ||
4d9128de | 3 | {% block title %}{{ entry.title|striptags|default('entry.default_title'|trans)|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 | 11 | <nav class="hide-on-large-only"> |
2831e77c | 12 | <div class="nav-panel-item cyan darken-1"> |
b17874a7 | 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') }}"> |
65d885da | 21 | <i class="material-icons">arrow_back</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"> |
65d885da | 28 | <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}unarchive{% 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') }}"> |
65d885da | 42 | <i class="material-icons small">arrow_back</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"> |
65d885da | 58 | <i class="material-icons small">refresh</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"> |
65d885da | 71 | <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}unarchive{% 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 | ||
0ef1ffbf BD |
100 | {% if craue_setting('share_public') |
101 | or craue_setting('share_twitter') | |
102 | or craue_setting('share_shaarli') | |
103 | or craue_setting('share_scuttle') | |
104 | or craue_setting('share_diaspora') | |
105 | or craue_setting('share_unmark') | |
106 | or craue_setting('carrot') | |
107 | or craue_setting('share_mail') | |
108 | %} | |
53e12188 AD |
109 | <li class="bold"> |
110 | <a class="waves-effect collapsible-header"> | |
5ecdfcd0 | 111 | <i class="material-icons small">share</i> |
0d42217e | 112 | <span>{{ 'entry.view.left_menu.share_content'|trans }}</span> |
53e12188 AD |
113 | </a> |
114 | <div class="collapsible-body"> | |
115 | <ul> | |
d0545b6b | 116 | {% if craue_setting('share_public') %} |
f3d0cb91 | 117 | <li> |
0c7f1ba7 | 118 | <a href="{{ path('share', {'id': entry.id }) }}" target="_blank" title="{{ 'entry.view.left_menu.public_link'|trans }}" class="tool icon-eye"> |
3377c938 | 119 | <span>{{ 'entry.view.left_menu.public_link'|trans }}</span> |
f3d0cb91 NL |
120 | </a> |
121 | </li> | |
f1be7af4 | 122 | <li> |
0c7f1ba7 | 123 | <a href="{{ path('delete_share', {'id': entry.id }) }}" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}" class="tool icon-no-eye"> |
f1be7af4 NL |
124 | <span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span> |
125 | </a> | |
126 | </li> | |
f3d0cb91 | 127 | {% endif %} |
daa2b7e7 JB |
128 | {% if craue_setting('share_twitter') %} |
129 | <li> | |
1bb7bdc8 | 130 | <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 |
131 | <span>twitter</span> |
132 | </a> | |
133 | </li> | |
134 | {% endif %} | |
135 | {% if craue_setting('share_shaarli') %} | |
136 | <li> | |
893fd643 | 137 | <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 }}{% if craue_setting('shaarli_share_origin_url') %}&original_url={{ entry.originUrl|url_encode }}{% endif %}" target="_blank" title="shaarli" class="tool icon-image shaarli"> |
46d78f87 | 138 | <span>shaarli</span> |
daa2b7e7 JB |
139 | </a> |
140 | </li> | |
141 | {% endif %} | |
fb9f100e F |
142 | {% if craue_setting('share_scuttle') %} |
143 | <li> | |
34806fab | 144 | <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 |
145 | <span>scuttle</span> |
146 | </a> | |
147 | </li> | |
5e9009ce | 148 | {% endif %} |
daa2b7e7 JB |
149 | {% if craue_setting('share_diaspora') %} |
150 | <li> | |
64f81bc3 | 151 | <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 | 152 | <span>diaspora*</span> |
daa2b7e7 JB |
153 | </a> |
154 | </li> | |
155 | {% endif %} | |
8a9604aa NL |
156 | {% if craue_setting('share_unmark') %} |
157 | <li> | |
64f81bc3 | 158 | <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 |
159 | <span>unmark.it</span> |
160 | </a> | |
161 | </li> | |
162 | {% endif %} | |
daa2b7e7 JB |
163 | {% if craue_setting('carrot') %} |
164 | <li> | |
64f81bc3 | 165 | <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 | 166 | <span>Carrot</span> |
daa2b7e7 JB |
167 | </a> |
168 | </li> | |
169 | {% endif %} | |
170 | {% if craue_setting('share_mail') %} | |
171 | <li> | |
64f81bc3 TC |
172 | <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"> |
173 | <i class="material-icons vertical-align-middle">mail</i> | |
0d42217e | 174 | <span>{{ 'entry.view.left_menu.share_email_label'|trans }}</span> |
daa2b7e7 JB |
175 | </a> |
176 | </li> | |
177 | {% endif %} | |
53e12188 AD |
178 | </ul> |
179 | </div> | |
180 | </li> | |
0ef1ffbf | 181 | {% endif %} |
53e12188 | 182 | |
cb48a569 NL |
183 | {% if craue_setting('show_printlink') %} |
184 | <li class="bold border-bottom hide-on-med-and-down"> | |
185 | <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.print'|trans }}" href="javascript: window.print();"> | |
5ecdfcd0 | 186 | <i class="material-icons small">print</i> |
cb48a569 NL |
187 | <span>{{ 'entry.view.left_menu.print'|trans }}</span> |
188 | </a> | |
189 | <div class="collapsible-body"></div> | |
190 | </li> | |
191 | {% endif %} | |
192 | ||
53e12188 AD |
193 | <li class="bold"> |
194 | <a class="waves-effect collapsible-header"> | |
5ecdfcd0 | 195 | <i class="material-icons small">file_download</i> |
5f82fc23 | 196 | <span>{{ 'entry.view.left_menu.export'|trans }}</span> |
53e12188 AD |
197 | </a> |
198 | <div class="collapsible-body"> | |
199 | <ul> | |
63e40f2d JB |
200 | {% if craue_setting('export_epub') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'epub' }) }}" title="Generate ePub file">EPUB</a></li>{% endif %} |
201 | {% if craue_setting('export_mobi') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'mobi' }) }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | |
202 | {% if craue_setting('export_pdf') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'pdf' }) }}" title="Generate PDF file">PDF</a></li>{% endif %} | |
203 | {% if craue_setting('export_csv') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'csv' }) }}" title="Generate CSV file">CSV</a></li>{% endif %} | |
204 | {% 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 | 205 | {% 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 | 206 | {% 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 |
207 | </ul> |
208 | </div> | |
209 | </li> | |
210 | ||
211 | <li class="bold"> | |
0d42217e | 212 | <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 | 213 | <i class="material-icons small">error</i> |
0d42217e | 214 | <span>{{ 'entry.view.left_menu.problem.label'|trans }}</span> |
53e12188 AD |
215 | </a> |
216 | <div class="collapsible-body"></div> | |
217 | </li> | |
218 | ||
219 | </ul> | |
220 | ||
53e12188 AD |
221 | {% endblock %} |
222 | ||
223 | {% block content %} | |
224 | <div id="article"> | |
225 | <header class="mbm"> | |
4d9128de | 226 | <h1>{{ entry.title|striptags|default('entry.default_title'|trans)|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> |
53e12188 | 227 | </header> |
a754db33 | 228 | <aside> |
4c6ee89c TC |
229 | <div class="tools"> |
230 | <ul class="stats"> | |
7b0b3622 | 231 | <li> |
4c6ee89c | 232 | {% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %} |
7b0b3622 | 233 | </li> |
4c6ee89c TC |
234 | <li> |
235 | <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> | |
236 | {{ entry.createdAt|date('Y-m-d H:i') }} | |
237 | </li> | |
238 | {% if entry.publishedAt is not null %} | |
239 | <li> | |
240 | <i class="material-icons" title="{{ 'entry.view.published_at'|trans }}">create</i> | |
241 | {{ entry.publishedAt|date('Y-m-d H:i') }} | |
242 | </li> | |
243 | {% endif %} | |
244 | {% if entry.publishedBy is not empty %} | |
245 | <li> | |
246 | <i class="material-icons" title="{{ 'entry.view.published_by'|trans }}">person</i> | |
247 | {% for author in entry.publishedBy %} | |
03f2cacb | 248 | {{ author|raw }}{% if not loop.last %}, {% endif %} |
4c6ee89c TC |
249 | {% endfor %} |
250 | </li> | |
251 | {% endif %} | |
252 | <li> | |
253 | <i class="material-icons link">link</i> | |
254 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|striptags }}" class="tool"> | |
255 | {{ entry.domainName|removeWww }} | |
256 | </a> | |
257 | </li> | |
258 | <li> | |
259 | <i class="material-icons link">comment</i> | |
260 | {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} | |
261 | </li> | |
f0f162b8 KD |
262 | {% if entry.originUrl is not empty %} |
263 | <li> | |
ecf41ab3 | 264 | <i class="material-icons" title="{{ 'entry.view.provided_by'|trans }}">launch</i> |
f0f162b8 KD |
265 | <a href="{{ entry.originUrl|e }}" target="_blank" class="tool"> |
266 | {{ entry.originUrl|striptags|removeSchemeAndWww|truncate(32) }} | |
267 | </a> | |
268 | </li> | |
269 | {% endif %} | |
4c6ee89c | 270 | </ul> |
8e15ece7 | 271 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'entryId': entry.id, 'withRemove': true} only %} |
4c6ee89c | 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 %} |
03f2cacb | 279 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|default('entry.default_title'|trans)|raw }}" /></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> | |
65d885da KD |
292 | <li><a class="btn-floating" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a></li> |
293 | <li><a class="btn-floating" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</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 | |
5ecdfcd0 TC |
299 | <script id="annotationroutes" type="application/json"> |
300 | { | |
301 | "prefix": "", | |
302 | "urls": { | |
303 | "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}", | |
304 | "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}", | |
305 | "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}", | |
306 | "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}" | |
307 | }, | |
308 | "entryId": "{{ entry.id }}" | |
309 | }</script> | |
2b6e65a5 | 310 | |
53e12188 AD |
311 | {% endblock %} |
312 | ||
313 | {% block footer %} | |
c2257428 | 314 | {% endblock %} |