aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
diff options
context:
space:
mode:
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.twig23
1 files changed, 22 insertions, 1 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..9323e787 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
@@ -29,7 +29,8 @@
29 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}" class="tool bad-display icon icon-delete"><span>{% trans %}Does this article appear wrong?{% endtrans %}</span></a></li> 29 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}" class="tool bad-display icon icon-delete"><span>{% trans %}Does this article appear wrong?{% endtrans %}</span></a></li>
30 </ul> 30 </ul>
31 </div> 31 </div>
32 32 {% set nbAnnotations = entry.annotations | length %}
33 <span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span>
33 <aside class="tags"> 34 <aside class="tags">
34 {% for tag in entry.tags %} 35 {% for tag in entry.tags %}
35 <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a> 36 <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a>
@@ -107,5 +108,25 @@
107 retrievePercent({{ entry.id }}); 108 retrievePercent({{ entry.id }});
108 }); 109 });
109 }); 110 });
111
112 var app = new annotator.App();
113 app.include(annotator.ui.main, {
114 element: document.querySelector('article')
115 });
116 app.include(annotator.storage.http, {
117 prefix: '',
118 urls: {
119 create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
120 update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}',
121 destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}',
122 search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
123 }
124 });
125 app
126 .start()
127 .then(function () {
128 app.annotations.load({entry: {{ entry.id }}});
129 });
110 </script> 130 </script>
131
111{% endblock %} 132{% endblock %}