aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2016-02-23 11:32:48 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-02-26 18:14:12 +0100
commit7720cca5325eae71595e6355d6599448c30377fb (patch)
tree9e8589b42c3ba7d42d4601c4ed2feb597dfabf7c /src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
parentf38e03dc02c96344677fd2720912605b21c90b5d (diff)
downloadwallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.gz
wallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.zst
wallabag-7720cca5325eae71595e6355d6599448c30377fb.zip
Add annotator in baggy theme
+ Documentation about annotations
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
index 94f4ba7d..988cbd29 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
@@ -107,5 +107,25 @@
107 retrievePercent({{ entry.id }}); 107 retrievePercent({{ entry.id }});
108 }); 108 });
109 }); 109 });
110
111 var app = new annotator.App();
112 app.include(annotator.ui.main, {
113 element: document.querySelector('article')
114 });
115 app.include(annotator.storage.http, {
116 prefix: '',
117 urls: {
118 create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
119 update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
120 destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
121 search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
122 }
123 });
124 app
125 .start()
126 .then(function () {
127 app.annotations.load({entry: {{ entry.id }}});
128 });
110 </script> 129 </script>
130
111{% endblock %} 131{% endblock %}