diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-02-26 18:17:37 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-02-26 18:17:37 +0100 |
commit | 162954763e6f68e0cf4002822007683bde62fc25 (patch) | |
tree | a85f850eddb30b3435d1bb5f45d16d9ab465bbf9 /src/Wallabag/CoreBundle/Resources/views/themes/baggy | |
parent | d3f1a9dc1ac181033ec54f9149d2807199fa8f17 (diff) | |
parent | b07c7dfe787313b75e0996265e13cccc78da41be (diff) | |
download | wallabag-162954763e6f68e0cf4002822007683bde62fc25.tar.gz wallabag-162954763e6f68e0cf4002822007683bde62fc25.tar.zst wallabag-162954763e6f68e0cf4002822007683bde62fc25.zip |
Merge pull request #1653 from wallabag/v2-annotator-comments
V2 annotator comments
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | 23 |
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&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&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 %} |