forked from wallabag/wallabag
Rename CommentBundle with AnnotationBundle
This commit is contained in:
committed by
Jeremy Benoist
parent
9eab365e28
commit
4dc872238a
@ -9,7 +9,7 @@ use JMS\Serializer\Annotation\Groups;
|
||||
use JMS\Serializer\Annotation\XmlRoot;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\CommentBundle\Entity\Comment;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
|
||||
/**
|
||||
* Entry.
|
||||
@ -99,12 +99,12 @@ class Entry
|
||||
private $updatedAt;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\CommentBundle\Entity\Comment", mappedBy="entry", cascade={"persist", "remove"})
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"})
|
||||
* @ORM\JoinTable
|
||||
*
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
*/
|
||||
private $comments;
|
||||
private $annotations;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@ -366,19 +366,19 @@ class Entry
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayCollection<Comment>
|
||||
* @return ArrayCollection<Annotation>
|
||||
*/
|
||||
public function getComments()
|
||||
public function getAnnotations()
|
||||
{
|
||||
return $this->comments;
|
||||
return $this->annotations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Comment $comment
|
||||
* @param Annotation $annotation
|
||||
*/
|
||||
public function setComment(Comment $comment)
|
||||
public function setAnnotation(Annotation $annotation)
|
||||
{
|
||||
$this->comments[] = $comment;
|
||||
$this->annotations[] = $annotation;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -98,7 +98,7 @@ Toggle favorite: 'Marquer comme favori'
|
||||
Delete: 'Supprimer'
|
||||
"{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."
|
||||
http://website: "http://siteweb"
|
||||
"{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations": "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbComments% annotations"
|
||||
"{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations": "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbAnnotations% annotations"
|
||||
|
||||
# Edit entry
|
||||
Edit an entry: "Éditer un article"
|
||||
|
||||
@ -29,8 +29,8 @@
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
{% set nbComments = entry.comments | length %}
|
||||
<span class="tool link mdi-communication-comment"> {% transchoice nbComments %}{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations{% endtranschoice %}</span>
|
||||
{% set nbAnnotations = entry.annotations | length %}
|
||||
<span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span>
|
||||
<aside class="tags">
|
||||
{% for tag in entry.tags %}
|
||||
<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 @@
|
||||
prefix: '',
|
||||
urls: {
|
||||
create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
|
||||
update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
|
||||
destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
|
||||
update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}',
|
||||
destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}',
|
||||
search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
|
||||
}
|
||||
});
|
||||
|
||||
@ -187,8 +187,8 @@ main {
|
||||
</header>
|
||||
<aside>
|
||||
<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>
|
||||
{% set nbComments = entry.comments | length %}
|
||||
<span class="tool link mdi-communication-comment"> {% transchoice nbComments %}{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations{% endtranschoice %}</span>
|
||||
{% set nbAnnotations = entry.annotations | length %}
|
||||
<span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span>
|
||||
<div id="list">
|
||||
{% for tag in entry.tags %}
|
||||
<div class="chip">
|
||||
@ -221,8 +221,8 @@ app.include(annotator.storage.http, {
|
||||
prefix: '',
|
||||
urls: {
|
||||
create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
|
||||
update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
|
||||
destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
|
||||
update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}',
|
||||
destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}',
|
||||
search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user