diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index f6ba83ae..6f33da23 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -177,6 +177,7 @@ main { | |||
177 | padding: 0; | 177 | padding: 0; |
178 | } | 178 | } |
179 | </style> | 179 | </style> |
180 | |||
180 | {% endblock %} | 181 | {% endblock %} |
181 | 182 | ||
182 | {% block content %} | 183 | {% block content %} |
@@ -186,6 +187,8 @@ main { | |||
186 | </header> | 187 | </header> |
187 | <aside> | 188 | <aside> |
188 | <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> | 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> |
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> | ||
189 | <div id="list"> | 192 | <div id="list"> |
190 | {% for tag in entry.tags %} | 193 | {% for tag in entry.tags %} |
191 | <div class="chip"> | 194 | <div class="chip"> |
@@ -207,6 +210,29 @@ main { | |||
207 | {{ entry.content | raw }} | 210 | {{ entry.content | raw }} |
208 | </article> | 211 | </article> |
209 | </div> | 212 | </div> |
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 }) }}', | ||
224 | update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}', | ||
225 | destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}', | ||
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 | |||
210 | {% endblock %} | 236 | {% endblock %} |
211 | 237 | ||
212 | {% block footer %} | 238 | {% block footer %} |