diff options
author | Nicolas Lœuillet <nicolas.loeuillet@smile.fr> | 2016-02-23 11:32:48 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-26 18:14:12 +0100 |
commit | 7720cca5325eae71595e6355d6599448c30377fb (patch) | |
tree | 9e8589b42c3ba7d42d4601c4ed2feb597dfabf7c | |
parent | f38e03dc02c96344677fd2720912605b21c90b5d (diff) | |
download | wallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.gz wallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.zst wallabag-7720cca5325eae71595e6355d6599448c30377fb.zip |
Add annotator in baggy theme
+ Documentation about annotations
-rw-r--r-- | docs/en/index.rst | 1 | ||||
-rw-r--r-- | docs/en/user/annotations.rst | 24 | ||||
-rw-r--r-- | docs/fr/index.rst | 1 | ||||
-rw-r--r-- | docs/fr/user/annotations.rst | 25 | ||||
-rw-r--r-- | docs/img/user/annotations_1.png | bin | 0 -> 34930 bytes | |||
-rw-r--r-- | docs/img/user/annotations_2.png | bin | 0 -> 28142 bytes | |||
-rw-r--r-- | docs/img/user/annotations_3.png | bin | 0 -> 27277 bytes | |||
-rw-r--r-- | src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CommentBundle/Resources/config/routing.yml | 0 | ||||
-rw-r--r-- | src/Wallabag/CommentBundle/Resources/config/services.yml | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | 20 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 3 |
12 files changed, 71 insertions, 10 deletions
diff --git a/docs/en/index.rst b/docs/en/index.rst index ab58ca6b..54d79e0c 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst | |||
@@ -29,6 +29,7 @@ The main documentation for this application is organized into a couple sections: | |||
29 | user/configuration | 29 | user/configuration |
30 | user/first_article | 30 | user/first_article |
31 | user/errors_during_fetching | 31 | user/errors_during_fetching |
32 | user/annotations | ||
32 | user/import | 33 | user/import |
33 | user/download_articles | 34 | user/download_articles |
34 | user/filters | 35 | user/filters |
diff --git a/docs/en/user/annotations.rst b/docs/en/user/annotations.rst new file mode 100644 index 00000000..d30b2c52 --- /dev/null +++ b/docs/en/user/annotations.rst | |||
@@ -0,0 +1,24 @@ | |||
1 | Annotations | ||
2 | =========== | ||
3 | |||
4 | In each article you read, you can write annotations. It's easier to understand with some pictures. | ||
5 | |||
6 | Select the part of the article that you want to comment and click on the pencil: | ||
7 | |||
8 | .. image:: ../../img/user/annotations_1.png | ||
9 | :alt: Select your text | ||
10 | :align: center | ||
11 | |||
12 | Then, write your comment: | ||
13 | |||
14 | .. image:: ../../img/user/annotations_2.png | ||
15 | :alt: Write your comment | ||
16 | :align: center | ||
17 | |||
18 | The text is now highlighted and you can read your comment if you move the mouse cursor over it. | ||
19 | |||
20 | .. image:: ../../img/user/annotations_3.png | ||
21 | :alt: Read your comment | ||
22 | :align: center | ||
23 | |||
24 | You can create as many comments as you wish. | ||
diff --git a/docs/fr/index.rst b/docs/fr/index.rst index 5adc5ab5..48310680 100644 --- a/docs/fr/index.rst +++ b/docs/fr/index.rst | |||
@@ -30,6 +30,7 @@ La documentation principale de cette application est découpée en plusieurs sec | |||
30 | user/configuration | 30 | user/configuration |
31 | user/first_article | 31 | user/first_article |
32 | user/errors_during_fetching | 32 | user/errors_during_fetching |
33 | user/annotations | ||
33 | user/import | 34 | user/import |
34 | user/download_articles | 35 | user/download_articles |
35 | user/filters | 36 | user/filters |
diff --git a/docs/fr/user/annotations.rst b/docs/fr/user/annotations.rst new file mode 100644 index 00000000..8ba87e26 --- /dev/null +++ b/docs/fr/user/annotations.rst | |||
@@ -0,0 +1,25 @@ | |||
1 | Commentaires | ||
2 | ============ | ||
3 | |||
4 | Sur chaque article que vous lisez, vous pouvez écrire des commentaires. Puisqu'une image vaut mieux qu'un long discours, | ||
5 | voici ce que ça donne. | ||
6 | |||
7 | Sélectionnez la zone du texte que vous souhaitez commenter et cliquez sur le crayon : | ||
8 | |||
9 | .. image:: ../../img/user/annotations_1.png | ||
10 | :alt: Select your text | ||
11 | :align: center | ||
12 | |||
13 | Ensuite, écrivez votre commentaire : | ||
14 | |||
15 | .. image:: ../../img/user/annotations_2.png | ||
16 | :alt: Write your comment | ||
17 | :align: center | ||
18 | |||
19 | Le texte est maintenant surligné et vous pouvez lire le commentaire en le survolant avec votre souris. | ||
20 | |||
21 | .. image:: ../../img/user/annotations_3.png | ||
22 | :alt: Read your comment | ||
23 | :align: center | ||
24 | |||
25 | Vous pouvez créer autant de commentaires que vous le souhaitez. | ||
diff --git a/docs/img/user/annotations_1.png b/docs/img/user/annotations_1.png new file mode 100644 index 00000000..554282f5 --- /dev/null +++ b/docs/img/user/annotations_1.png | |||
Binary files differ | |||
diff --git a/docs/img/user/annotations_2.png b/docs/img/user/annotations_2.png new file mode 100644 index 00000000..5351d2c5 --- /dev/null +++ b/docs/img/user/annotations_2.png | |||
Binary files differ | |||
diff --git a/docs/img/user/annotations_3.png b/docs/img/user/annotations_3.png new file mode 100644 index 00000000..bc371ec3 --- /dev/null +++ b/docs/img/user/annotations_3.png | |||
Binary files differ | |||
diff --git a/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php b/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php index b58a17a0..2d0b64ad 100644 --- a/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php +++ b/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php | |||
@@ -16,8 +16,5 @@ class WallabagCommentExtension extends Extension | |||
16 | { | 16 | { |
17 | $configuration = new Configuration(); | 17 | $configuration = new Configuration(); |
18 | $config = $this->processConfiguration($configuration, $configs); | 18 | $config = $this->processConfiguration($configuration, $configs); |
19 | |||
20 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
21 | $loader->load('services.yml'); | ||
22 | } | 19 | } |
23 | } | 20 | } |
diff --git a/src/Wallabag/CommentBundle/Resources/config/routing.yml b/src/Wallabag/CommentBundle/Resources/config/routing.yml deleted file mode 100644 index e69de29b..00000000 --- a/src/Wallabag/CommentBundle/Resources/config/routing.yml +++ /dev/null | |||
diff --git a/src/Wallabag/CommentBundle/Resources/config/services.yml b/src/Wallabag/CommentBundle/Resources/config/services.yml deleted file mode 100644 index 0e7972a4..00000000 --- a/src/Wallabag/CommentBundle/Resources/config/services.yml +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | services: | ||
2 | # wallabag_comment.example: | ||
3 | # class: Wallabag\CommentBundle\Example | ||
4 | # arguments: ["@service_id", "plain_value", %parameter%] | ||
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 %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 8ea2d691..2a06484e 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -198,9 +198,6 @@ app | |||
198 | .then(function () { | 198 | .then(function () { |
199 | app.annotations.load({entry: {{ entry.id }}}); | 199 | app.annotations.load({entry: {{ entry.id }}}); |
200 | }); | 200 | }); |
201 | |||
202 | |||
203 | |||
204 | </script> | 201 | </script> |
205 | 202 | ||
206 | {% endblock %} | 203 | {% endblock %} |