X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fbaggy%2FEntry%2Fentry.html.twig;h=7808b4dd56628829ce6f366014fadccdbf7670bc;hb=519ba0b5e71cd9b5abd620f682fd2296e6180af3;hp=27a88287b8550a46fad6cb8b7d1b9e92d930eba0;hpb=63e40f2d7c4074aff0be587c828eb511a6b7c878;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 27a88287..7808b4dd 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,33 +3,41 @@ {% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %} {% block content %} -
+
+
+

{{ entry.title|raw }} ✎

+
+ +
-
-
-

{{ entry.title|raw }} ✎

-
+ {% set nbAnnotations = entry.annotations | length %} + {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} {% if entry.previewPicture is not null %}
{{ entry.title|raw }}
@@ -64,7 +72,7 @@ $("body").css("cursor", "auto"); });*/ - // toggle favorite property of current article + // toggle star property of current article /* $('#setFav').click(function(){ $("body").css("cursor", "wait"); $.ajax( { url: '{{ path('star_entry', { 'id': entry.id }) }}' }).done( @@ -100,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 %}