X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fbaggy%2FEntry%2Fentry.html.twig;h=5a80033232251c122b8c70fbbaa264698335f98a;hb=cb48a569e0ea76a7f6ce1275ae6144d3497deb84;hp=c23d0e272540577c07360dcf12ec67a2e9aae8b8;hpb=30d81a47c689e1d7d963fcd3fd42af9958805e31;p=github%2Fwallabag%2Fwallabag.git
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 c23d0e27..5a800332 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
@@ -3,34 +3,41 @@
{% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block content %}
-
- {{ entry.title|raw }} â
+ {{ entry.title|raw }} â
+
+
+ {% set nbAnnotations = entry.annotations | length %}
+
{% if entry.previewPicture is not null %}
@@ -101,5 +108,25 @@
retrievePercent({{ entry.id }});
});
});
+
+ var app = new annotator.App();
+ app.include(annotator.ui.main, {
+ element: document.querySelector('article')
+ });
+ app.include(annotator.storage.http, {
+ prefix: '',
+ urls: {
+ create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
+ update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}',
+ destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}',
+ search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
+ }
+ });
+ app
+ .start()
+ .then(function () {
+ app.annotations.load({entry: {{ entry.id }}});
+ });
+
{% endblock %}