diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/base.html.twig | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 26 |
2 files changed, 29 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 3cadabfb..2748c7e3 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig | |||
@@ -38,11 +38,13 @@ | |||
38 | 38 | ||
39 | <link rel="shortcut icon" type="image/x-icon" href="{{ asset('bundles/wallabagcore/themes/_global/img/appicon/favicon.ico') }}"> | 39 | <link rel="shortcut icon" type="image/x-icon" href="{{ asset('bundles/wallabagcore/themes/_global/img/appicon/favicon.ico') }}"> |
40 | 40 | ||
41 | {% block css %}{% endblock %} | 41 | {% block css %} |
42 | {% endblock %} | ||
42 | {% block scripts %} | 43 | {% block scripts %} |
43 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery-2.0.3.min.js') }}"></script> | 44 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery-2.0.3.min.js') }}"></script> |
44 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery.cookie.js') }}"></script> | 45 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery.cookie.js') }}"></script> |
45 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/bookmarklet.js') }}"></script> | 46 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/bookmarklet.js') }}"></script> |
47 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/annotator.min.js') }}"></script> | ||
46 | {% endblock %} | 48 | {% endblock %} |
47 | 49 | ||
48 | <title>{% block title %}{% endblock %}</title> | 50 | <title>{% block title %}{% endblock %}</title> |
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 %} |