diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry')
-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..8ea2d691 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,32 @@ main { | |||
177 | padding: 0; | 177 | padding: 0; |
178 | } | 178 | } |
179 | </style> | 179 | </style> |
180 | |||
181 | <script type="text/javascript"> | ||
182 | |||
183 | var app = new annotator.App(); | ||
184 | app.include(annotator.ui.main, { | ||
185 | element: document.querySelector('article') | ||
186 | }); | ||
187 | app.include(annotator.storage.http, { | ||
188 | prefix: '', | ||
189 | urls: { | ||
190 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', | ||
191 | update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}', | ||
192 | destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}', | ||
193 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' | ||
194 | } | ||
195 | }); | ||
196 | app | ||
197 | .start() | ||
198 | .then(function () { | ||
199 | app.annotations.load({entry: {{ entry.id }}}); | ||
200 | }); | ||
201 | |||
202 | |||
203 | |||
204 | </script> | ||
205 | |||
180 | {% endblock %} | 206 | {% endblock %} |
181 | 207 | ||
182 | {% block content %} | 208 | {% block content %} |