]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | ||
784bb4c3 | 3 | {% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %} |
53e12188 AD |
4 | |
5 | {% block menu %} | |
fcb3faf1 AD |
6 | <div class="progress"> |
7 | <div class="determinate"></div> | |
8 | </div> | |
b17874a7 AD |
9 | <nav class="hide-on-large-only"> |
10 | <div class="nav-wrapper cyan darken-1"> | |
11 | <ul> | |
12 | <li> | |
fad31615 | 13 | <a class="waves-effect" href="{{ path('homepage') }}"> |
b17874a7 AD |
14 | <i class="mdi-action-exit-to-app"></i> |
15 | </a> | |
16 | </li> | |
17 | </ul> | |
18 | <ul class="right"> | |
19 | <li> | |
20 | <a class="waves-effect" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> | |
21 | <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i> | |
22 | </a> | |
23 | </li> | |
24 | <li> | |
25 | <a class="waves-effect" title="{% trans %}Favorite{% endtrans %}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav"> | |
26 | <i class="{% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %} small"></i> | |
27 | </a> | |
28 | </li> | |
29 | <li> | |
30 | <a href="#" data-activates="slide-out" class="button-collapse right"> | |
31 | <i class="mdi-navigation-menu"></i> | |
32 | </a> | |
33 | </li> | |
34 | </ul> | |
35 | </div> | |
36 | </nav> | |
9948d899 | 37 | <ul id="slide-out" class="collapsible side-nav fixed reader-mode" data-collapsible="accordion"> |
b17874a7 | 38 | <li class="bold border-bottom hide-on-med-and-down"> |
fad31615 | 39 | <a class="waves-effect collapsible-header" href="{{ path('homepage') }}"> |
53e12188 AD |
40 | <i class="mdi-action-exit-to-app small"></i> |
41 | <span>{% trans %}back{% endtrans %}</span> | |
42 | </a> | |
43 | <div class="collapsible-body"></div> | |
44 | </li> | |
45 | ||
9cc6bd87 NL |
46 | <li class="bold border-bottom hide-on-med-and-down"> |
47 | <a class="waves-effect collapsible-header" href="{{ entry.url|e }}"> | |
48 | <i class="mdi-content-link small"></i> | |
49 | <span>{% trans %}original article{% endtrans %}</span> | |
50 | </a> | |
51 | <div class="collapsible-body"></div> | |
52 | </li> | |
53 | ||
831b02aa | 54 | <li class="bold hide-on-med-and-down"> |
9e33bc9d | 55 | <a class="waves-effect collapsible-header" title="{% trans %}Re-fetch content{% endtrans %}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload"> |
831b02aa | 56 | <i class="mdi-action-autorenew small"></i> |
9e33bc9d | 57 | <span>{% trans %}Re-fetch content{% endtrans %}</span> |
831b02aa JB |
58 | </a> |
59 | <div class="collapsible-body"></div> | |
60 | </li> | |
61 | ||
b17874a7 | 62 | <li class="bold hide-on-med-and-down"> |
53e12188 AD |
63 | <a class="waves-effect collapsible-header" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> |
64 | <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i> | |
6c9bad13 | 65 | <span>{% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}</span> |
53e12188 AD |
66 | </a> |
67 | <div class="collapsible-body"></div> | |
68 | </li> | |
69 | ||
b17874a7 | 70 | <li class="bold hide-on-med-and-down"> |
53e12188 AD |
71 | <a class="waves-effect collapsible-header" title="{% trans %}Favorite{% endtrans %}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav"> |
72 | <i class="{% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %} small"></i> | |
cfb28c9d | 73 | <span>{% trans %}Favorite{% endtrans %}</span> |
53e12188 AD |
74 | </a> |
75 | <div class="collapsible-body"></div> | |
76 | </li> | |
b17874a7 | 77 | <li class="bold border-bottom hide-on-med-and-down"> |
53e12188 AD |
78 | <a class="waves-effect collapsible-header" title="{% trans %}Delete{% endtrans %}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> |
79 | <i class="mdi-action-delete small"></i> | |
80 | <span>{% trans %}Delete{% endtrans %}</span> | |
81 | </a> | |
82 | <div class="collapsible-body"></div> | |
83 | </li> | |
84 | ||
a754db33 NL |
85 | <li class="bold border-bottom hide-on-med-and-down"> |
86 | <a class="waves-effect collapsible-header" id="nav-btn-add-tag"> | |
87 | <i class="mdi-action-label-outline small"></i> | |
88 | <span>{% trans %}Add a tag{% endtrans %}</span> | |
89 | </a> | |
90 | <div class="collapsible-body"></div> | |
91 | </li> | |
92 | ||
53e12188 AD |
93 | <li class="bold"> |
94 | <a class="waves-effect collapsible-header"> | |
95 | <i class="mdi-social-share small"></i> | |
96 | <span>{% trans %}Share{% endtrans %}</span> | |
97 | </a> | |
98 | <div class="collapsible-body"> | |
99 | <ul> | |
daa2b7e7 JB |
100 | {% if craue_setting('share_twitter') %} |
101 | <li> | |
102 | <a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="twitter"> | |
103 | <span>twitter</span> | |
104 | </a> | |
105 | </li> | |
106 | {% endif %} | |
107 | {% if craue_setting('share_shaarli') %} | |
108 | <li> | |
109 | <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"> | |
110 | <span>shaarli</span> | |
111 | </a> | |
112 | </li> | |
113 | {% endif %} | |
114 | {% if craue_setting('share_diaspora') %} | |
115 | <li> | |
116 | <a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora}"> | |
117 | <span>diaspora}</span> | |
118 | </a> | |
119 | </li> | |
120 | {% endif %} | |
121 | {% if craue_setting('carrot') %} | |
122 | <li> | |
123 | <a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot"> | |
124 | <span>Carrot</span> | |
125 | </a> | |
126 | </li> | |
127 | {% endif %} | |
128 | {% if craue_setting('share_mail') %} | |
129 | <li> | |
130 | <a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}"> | |
131 | <span>{% trans %}Email{% endtrans %}</span> | |
132 | </a> | |
133 | </li> | |
134 | {% endif %} | |
53e12188 AD |
135 | </ul> |
136 | </div> | |
137 | </li> | |
138 | ||
139 | <li class="bold"> | |
140 | <a class="waves-effect collapsible-header"> | |
141 | <i class="mdi-file-file-download small"></i> | |
03690d13 | 142 | <span>{% trans %}Download{% endtrans %}</span> |
53e12188 AD |
143 | </a> |
144 | <div class="collapsible-body"> | |
145 | <ul> | |
63e40f2d JB |
146 | {% if craue_setting('export_epub') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'epub' }) }}" title="Generate ePub file">EPUB</a></li>{% endif %} |
147 | {% if craue_setting('export_mobi') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'mobi' }) }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | |
148 | {% if craue_setting('export_pdf') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'pdf' }) }}" title="Generate PDF file">PDF</a></li>{% endif %} | |
149 | {% if craue_setting('export_csv') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'csv' }) }}" title="Generate CSV file">CSV</a></li>{% endif %} | |
150 | {% 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 | 151 | {% 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 | 152 | {% 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 |
153 | </ul> |
154 | </div> | |
155 | </li> | |
156 | ||
b17874a7 AD |
157 | <li class="bold hide-on-large-only"> |
158 | <a class="waves-effect collapsible-header" title="{% trans %}Delete{% endtrans %}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> | |
159 | <i class="mdi-action-delete small"></i> | |
160 | <span>{% trans %}Delete{% endtrans %}</span> | |
161 | </a> | |
162 | <div class="collapsible-body"></div> | |
163 | </li> | |
164 | ||
53e12188 AD |
165 | <li class="bold"> |
166 | <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}"> | |
167 | <i class="mdi-alert-error small"></i> | |
168 | <span>{% trans %}Problems?{% endtrans %}</span> | |
169 | </a> | |
170 | <div class="collapsible-body"></div> | |
171 | </li> | |
172 | ||
173 | </ul> | |
174 | ||
53e12188 AD |
175 | <style> |
176 | main { | |
177 | padding: 0; | |
178 | } | |
179 | </style> | |
f38e03dc | 180 | |
53e12188 AD |
181 | {% endblock %} |
182 | ||
183 | {% block content %} | |
184 | <div id="article"> | |
185 | <header class="mbm"> | |
b17874a7 | 186 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1> |
53e12188 | 187 | </header> |
a754db33 | 188 | <aside> |
784bb4c3 | 189 | <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link mdi-content-link"> <span>{{ entry.domainName|removeWww }}</span></a> |
4dc87223 NL |
190 | {% set nbAnnotations = entry.annotations | length %} |
191 | <span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span> | |
a754db33 | 192 | <div id="list"> |
9c8f7af1 TC |
193 | {% for tag in entry.tags %} |
194 | <div class="chip"> | |
575e6907 | 195 | {{ tag.label }} <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="mdi-action-delete"></i></a> |
9c8f7af1 TC |
196 | </div> |
197 | {% endfor %} | |
a754db33 NL |
198 | </div> |
199 | ||
e610143f NL |
200 | {% if entry.previewPicture is not null %} |
201 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div> | |
202 | {% endif %} | |
203 | ||
a754db33 NL |
204 | <div class="input-field nav-panel-add-tag" style="display: none"> |
205 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | |
206 | </div> | |
207 | ||
53e12188 AD |
208 | </aside> |
209 | <article> | |
210 | {{ entry.content | raw }} | |
211 | </article> | |
212 | </div> | |
2b6e65a5 TC |
213 | |
214 | <script type="text/javascript"> | |
215 | ||
216 | var app = new annotator.App(); | |
217 | app.include(annotator.ui.main, { | |
218 | element: document.querySelector('article') | |
219 | }); | |
220 | app.include(annotator.storage.http, { | |
221 | prefix: '', | |
222 | urls: { | |
223 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', | |
4dc87223 NL |
224 | update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}', |
225 | destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}', | |
2b6e65a5 TC |
226 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' |
227 | } | |
228 | }); | |
229 | app | |
230 | .start() | |
231 | .then(function () { | |
232 | app.annotations.load({entry: {{ entry.id }}}); | |
233 | }); | |
234 | </script> | |
235 | ||
53e12188 AD |
236 | {% endblock %} |
237 | ||
238 | {% block footer %} | |
c2257428 | 239 | {% endblock %} |