diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-02-26 13:59:08 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-26 18:14:42 +0100 |
commit | 4dc872238a61f33c886c423c5812cc578b3b1cdc (patch) | |
tree | 4a9413cca2b24e9290057159eeb3833c20aefddb /src/Wallabag/CoreBundle | |
parent | 9eab365e28de969036e58245a57a8a6418541b3c (diff) | |
download | wallabag-4dc872238a61f33c886c423c5812cc578b3b1cdc.tar.gz wallabag-4dc872238a61f33c886c423c5812cc578b3b1cdc.tar.zst wallabag-4dc872238a61f33c886c423c5812cc578b3b1cdc.zip |
Rename CommentBundle with AnnotationBundle
Diffstat (limited to 'src/Wallabag/CoreBundle')
4 files changed, 18 insertions, 18 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 5cf84f03..bd712a04 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -9,7 +9,7 @@ use JMS\Serializer\Annotation\Groups; | |||
9 | use JMS\Serializer\Annotation\XmlRoot; | 9 | use JMS\Serializer\Annotation\XmlRoot; |
10 | use Symfony\Component\Validator\Constraints as Assert; | 10 | use Symfony\Component\Validator\Constraints as Assert; |
11 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\UserBundle\Entity\User; |
12 | use Wallabag\CommentBundle\Entity\Comment; | 12 | use Wallabag\AnnotationBundle\Entity\Annotation; |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * Entry. | 15 | * Entry. |
@@ -99,12 +99,12 @@ class Entry | |||
99 | private $updatedAt; | 99 | private $updatedAt; |
100 | 100 | ||
101 | /** | 101 | /** |
102 | * @ORM\OneToMany(targetEntity="Wallabag\CommentBundle\Entity\Comment", mappedBy="entry", cascade={"persist", "remove"}) | 102 | * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) |
103 | * @ORM\JoinTable | 103 | * @ORM\JoinTable |
104 | * | 104 | * |
105 | * @Groups({"entries_for_user", "export_all"}) | 105 | * @Groups({"entries_for_user", "export_all"}) |
106 | */ | 106 | */ |
107 | private $comments; | 107 | private $annotations; |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * @var string | 110 | * @var string |
@@ -366,19 +366,19 @@ class Entry | |||
366 | } | 366 | } |
367 | 367 | ||
368 | /** | 368 | /** |
369 | * @return ArrayCollection<Comment> | 369 | * @return ArrayCollection<Annotation> |
370 | */ | 370 | */ |
371 | public function getComments() | 371 | public function getAnnotations() |
372 | { | 372 | { |
373 | return $this->comments; | 373 | return $this->annotations; |
374 | } | 374 | } |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * @param Comment $comment | 377 | * @param Annotation $annotation |
378 | */ | 378 | */ |
379 | public function setComment(Comment $comment) | 379 | public function setAnnotation(Annotation $annotation) |
380 | { | 380 | { |
381 | $this->comments[] = $comment; | 381 | $this->annotations[] = $annotation; |
382 | } | 382 | } |
383 | 383 | ||
384 | /** | 384 | /** |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 548a164b..e4935b9e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -98,7 +98,7 @@ Toggle favorite: 'Marquer comme favori' | |||
98 | Delete: 'Supprimer' | 98 | Delete: 'Supprimer' |
99 | "{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.": "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." | 99 | "{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.": "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." |
100 | http://website: "http://siteweb" | 100 | http://website: "http://siteweb" |
101 | "{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations": "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbComments% annotations" | 101 | "{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations": "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbAnnotations% annotations" |
102 | 102 | ||
103 | # Edit entry | 103 | # Edit entry |
104 | Edit an entry: "Éditer un article" | 104 | Edit an entry: "Éditer un article" |
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 817e39b8..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,8 +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 | {% set nbComments = entry.comments | length %} | 32 | {% set nbAnnotations = entry.annotations | length %} |
33 | <span class="tool link mdi-communication-comment"> {% transchoice nbComments %}{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations{% endtranschoice %}</span> | 33 | <span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span> |
34 | <aside class="tags"> | 34 | <aside class="tags"> |
35 | {% for tag in entry.tags %} | 35 | {% for tag in entry.tags %} |
36 | <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> |
@@ -117,8 +117,8 @@ | |||
117 | prefix: '', | 117 | prefix: '', |
118 | urls: { | 118 | urls: { |
119 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', | 119 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', |
120 | update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}', | 120 | update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}', |
121 | destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}', | 121 | destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}', |
122 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' | 122 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' |
123 | } | 123 | } |
124 | }); | 124 | }); |
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 4839c3ea..6f33da23 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 | |||
@@ -187,8 +187,8 @@ main { | |||
187 | </header> | 187 | </header> |
188 | <aside> | 188 | <aside> |
189 | <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link mdi-content-link"> <span>{{ entry.domainName|removeWww }}</span></a> | 189 | <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link mdi-content-link"> <span>{{ entry.domainName|removeWww }}</span></a> |
190 | {% set nbComments = entry.comments | length %} | 190 | {% set nbAnnotations = entry.annotations | length %} |
191 | <span class="tool link mdi-communication-comment"> {% transchoice nbComments %}{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations{% endtranschoice %}</span> | 191 | <span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span> |
192 | <div id="list"> | 192 | <div id="list"> |
193 | {% for tag in entry.tags %} | 193 | {% for tag in entry.tags %} |
194 | <div class="chip"> | 194 | <div class="chip"> |
@@ -221,8 +221,8 @@ app.include(annotator.storage.http, { | |||
221 | prefix: '', | 221 | prefix: '', |
222 | urls: { | 222 | urls: { |
223 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', | 223 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', |
224 | update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}', | 224 | update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}', |
225 | destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}', | 225 | destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}', |
226 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' | 226 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' |
227 | } | 227 | } |
228 | }); | 228 | }); |