diff options
Diffstat (limited to 'src')
15 files changed, 41 insertions, 22 deletions
diff --git a/src/Wallabag/AnnotationBundle/Entity/Annotation.php b/src/Wallabag/AnnotationBundle/Entity/Annotation.php index 90ee7c2d..c48d8731 100644 --- a/src/Wallabag/AnnotationBundle/Entity/Annotation.php +++ b/src/Wallabag/AnnotationBundle/Entity/Annotation.php | |||
@@ -7,6 +7,7 @@ use JMS\Serializer\Annotation\ExclusionPolicy; | |||
7 | use JMS\Serializer\Annotation\Exclude; | 7 | use JMS\Serializer\Annotation\Exclude; |
8 | use JMS\Serializer\Annotation\VirtualProperty; | 8 | use JMS\Serializer\Annotation\VirtualProperty; |
9 | use JMS\Serializer\Annotation\SerializedName; | 9 | use JMS\Serializer\Annotation\SerializedName; |
10 | use JMS\Serializer\Annotation\Groups; | ||
10 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\UserBundle\Entity\User; |
11 | use Wallabag\CoreBundle\Entity\Entry; | 12 | use Wallabag\CoreBundle\Entity\Entry; |
12 | 13 | ||
@@ -33,6 +34,8 @@ class Annotation | |||
33 | * @var string | 34 | * @var string |
34 | * | 35 | * |
35 | * @ORM\Column(name="text", type="text") | 36 | * @ORM\Column(name="text", type="text") |
37 | * | ||
38 | * @Groups({"entries_for_user", "export_all"}) | ||
36 | */ | 39 | */ |
37 | private $text; | 40 | private $text; |
38 | 41 | ||
@@ -54,6 +57,8 @@ class Annotation | |||
54 | * @var string | 57 | * @var string |
55 | * | 58 | * |
56 | * @ORM\Column(name="quote", type="string") | 59 | * @ORM\Column(name="quote", type="string") |
60 | * | ||
61 | * @Groups({"entries_for_user", "export_all"}) | ||
57 | */ | 62 | */ |
58 | private $quote; | 63 | private $quote; |
59 | 64 | ||
@@ -61,6 +66,8 @@ class Annotation | |||
61 | * @var array | 66 | * @var array |
62 | * | 67 | * |
63 | * @ORM\Column(name="ranges", type="array") | 68 | * @ORM\Column(name="ranges", type="array") |
69 | * | ||
70 | * @Groups({"entries_for_user", "export_all"}) | ||
64 | */ | 71 | */ |
65 | private $ranges; | 72 | private $ranges; |
66 | 73 | ||
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php index 6c6a331a..fedad009 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php | |||
@@ -23,6 +23,9 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | |||
23 | $entry1->setContent('This is my content /o/'); | 23 | $entry1->setContent('This is my content /o/'); |
24 | $entry1->setLanguage('en'); | 24 | $entry1->setLanguage('en'); |
25 | 25 | ||
26 | $entry1->addTag($this->getReference('foo-tag')); | ||
27 | $entry1->addTag($this->getReference('baz-tag')); | ||
28 | |||
26 | $manager->persist($entry1); | 29 | $manager->persist($entry1); |
27 | 30 | ||
28 | $this->addReference('entry1', $entry1); | 31 | $this->addReference('entry1', $entry1); |
@@ -96,6 +99,7 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | |||
96 | $entry6->setContent('This is my content /o/'); | 99 | $entry6->setContent('This is my content /o/'); |
97 | $entry6->setArchived(true); | 100 | $entry6->setArchived(true); |
98 | $entry6->setLanguage('de'); | 101 | $entry6->setLanguage('de'); |
102 | $entry6->addTag($this->getReference('bar-tag')); | ||
99 | 103 | ||
100 | $manager->persist($entry6); | 104 | $manager->persist($entry6); |
101 | 105 | ||
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index a4b0d7a8..f2da3f4d 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -196,8 +196,6 @@ class Entry | |||
196 | * @ORM\JoinColumn(name="tag_id", referencedColumnName="id") | 196 | * @ORM\JoinColumn(name="tag_id", referencedColumnName="id") |
197 | * } | 197 | * } |
198 | * ) | 198 | * ) |
199 | * | ||
200 | * @Groups({"entries_for_user", "export_all"}) | ||
201 | */ | 199 | */ |
202 | private $tags; | 200 | private $tags; |
203 | 201 | ||
@@ -542,6 +540,21 @@ class Entry | |||
542 | } | 540 | } |
543 | 541 | ||
544 | /** | 542 | /** |
543 | * @VirtualProperty | ||
544 | * @SerializedName("tags") | ||
545 | * @Groups({"entries_for_user", "export_all"}) | ||
546 | */ | ||
547 | public function getSerializedTags() | ||
548 | { | ||
549 | $data = []; | ||
550 | foreach ($this->tags as $tag) { | ||
551 | $data[] = $tag->getLabel(); | ||
552 | } | ||
553 | |||
554 | return $data; | ||
555 | } | ||
556 | |||
557 | /** | ||
545 | * @param Tag $tag | 558 | * @param Tag $tag |
546 | */ | 559 | */ |
547 | public function addTag(Tag $tag) | 560 | public function addTag(Tag $tag) |
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 0c627dcd..e50c68a6 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -21,7 +21,6 @@ class EntriesExport | |||
21 | private $entries = []; | 21 | private $entries = []; |
22 | private $authors = ['wallabag']; | 22 | private $authors = ['wallabag']; |
23 | private $language = ''; | 23 | private $language = ''; |
24 | private $tags = []; | ||
25 | private $footerTemplate = '<div style="text-align:center;"> | 24 | private $footerTemplate = '<div style="text-align:center;"> |
26 | <p>Produced by wallabag with %EXPORT_METHOD%</p> | 25 | <p>Produced by wallabag with %EXPORT_METHOD%</p> |
27 | <p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p> | 26 | <p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p> |
@@ -53,10 +52,6 @@ class EntriesExport | |||
53 | 52 | ||
54 | $this->entries = $entries; | 53 | $this->entries = $entries; |
55 | 54 | ||
56 | foreach ($entries as $entry) { | ||
57 | $this->tags[] = $entry->getTags(); | ||
58 | } | ||
59 | |||
60 | return $this; | 55 | return $this; |
61 | } | 56 | } |
62 | 57 | ||
@@ -159,8 +154,8 @@ class EntriesExport | |||
159 | 154 | ||
160 | // set tags as subjects | 155 | // set tags as subjects |
161 | foreach ($this->entries as $entry) { | 156 | foreach ($this->entries as $entry) { |
162 | foreach ($this->tags as $tag) { | 157 | foreach ($entry->getTags() as $tag) { |
163 | $book->setSubject($tag['value']); | 158 | $book->setSubject($tag->getLabel()); |
164 | } | 159 | } |
165 | 160 | ||
166 | // the reader in Kobo Devices doesn't likes special caracters | 161 | // the reader in Kobo Devices doesn't likes special caracters |
@@ -265,8 +260,8 @@ class EntriesExport | |||
265 | * Adding actual entries | 260 | * Adding actual entries |
266 | */ | 261 | */ |
267 | foreach ($this->entries as $entry) { | 262 | foreach ($this->entries as $entry) { |
268 | foreach ($this->tags as $tag) { | 263 | foreach ($entry->getTags() as $tag) { |
269 | $pdf->SetKeywords($tag['value']); | 264 | $pdf->SetKeywords($tag->getLabel()); |
270 | } | 265 | } |
271 | 266 | ||
272 | $pdf->AddPage(); | 267 | $pdf->AddPage(); |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 01067035..2652a102 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | # entry_saved_failed: 'Entry saved but fetching content failed' | 464 | # entry_saved_failed: 'Entry saved but fetching content failed' |
465 | # entry_updated: 'Entry updated' | 465 | # entry_updated: 'Entry updated' |
466 | # entry_reloaded: 'Entry reloaded' | 466 | # entry_reloaded: 'Entry reloaded' |
467 | # entry_reload_failed: 'Entry reloaded but fetching content failed' | 467 | # entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
468 | entry_archived: 'Artikel arkiveret' | 468 | entry_archived: 'Artikel arkiveret' |
469 | entry_unarchived: 'Artikel ikke længere arkiveret' | 469 | entry_unarchived: 'Artikel ikke længere arkiveret' |
470 | entry_starred: 'Artikel markeret som favorit' | 470 | entry_starred: 'Artikel markeret som favorit' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 50195b05..e0f29b61 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | entry_saved_failed: 'Eintrag gespeichert, aber das Abrufen des Inhalts ist fehlgeschlagen' | 464 | entry_saved_failed: 'Eintrag gespeichert, aber das Abrufen des Inhalts ist fehlgeschlagen' |
465 | entry_updated: 'Eintrag aktualisiert' | 465 | entry_updated: 'Eintrag aktualisiert' |
466 | entry_reloaded: 'Eintrag neugeladen' | 466 | entry_reloaded: 'Eintrag neugeladen' |
467 | entry_reload_failed: 'Eintrag neugeladen, aber das Abrufen des Inhalts ist fehlgeschlagen' | 467 | entry_reloaded_failed: 'Eintrag neugeladen, aber das Abrufen des Inhalts ist fehlgeschlagen' |
468 | entry_archived: 'Artikel archiviert' | 468 | entry_archived: 'Artikel archiviert' |
469 | entry_unarchived: 'Artikel dearchiviert' | 469 | entry_unarchived: 'Artikel dearchiviert' |
470 | entry_starred: 'Artikel favorisiert' | 470 | entry_starred: 'Artikel favorisiert' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 2aba86ff..b8e98112 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -463,7 +463,7 @@ flashes: | |||
463 | entry_saved_failed: 'Entry saved but fetching content failed' | 463 | entry_saved_failed: 'Entry saved but fetching content failed' |
464 | entry_updated: 'Entry updated' | 464 | entry_updated: 'Entry updated' |
465 | entry_reloaded: 'Entry reloaded' | 465 | entry_reloaded: 'Entry reloaded' |
466 | entry_reload_failed: 'Entry reloaded but fetching content failed' | 466 | entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
467 | entry_archived: 'Entry archived' | 467 | entry_archived: 'Entry archived' |
468 | entry_unarchived: 'Entry unarchived' | 468 | entry_unarchived: 'Entry unarchived' |
469 | entry_starred: 'Entry starred' | 469 | entry_starred: 'Entry starred' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index b7495510..70633bd7 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | # entry_saved_failed: 'Entry saved but fetching content failed' | 464 | # entry_saved_failed: 'Entry saved but fetching content failed' |
465 | entry_updated: 'Entrada actualizada' | 465 | entry_updated: 'Entrada actualizada' |
466 | entry_reloaded: 'Entrada recargada' | 466 | entry_reloaded: 'Entrada recargada' |
467 | # entry_reload_failed: 'Entry reloaded but fetching content failed' | 467 | # entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
468 | entry_archived: 'Artículo archivado' | 468 | entry_archived: 'Artículo archivado' |
469 | entry_unarchived: 'Artículo desarchivado' | 469 | entry_unarchived: 'Artículo desarchivado' |
470 | entry_starred: 'Artículo guardado en los favoritos' | 470 | entry_starred: 'Artículo guardado en los favoritos' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 13763564..074ab7a8 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -463,7 +463,7 @@ flashes: | |||
463 | # entry_saved_failed: 'Entry saved but fetching content failed' | 463 | # entry_saved_failed: 'Entry saved but fetching content failed' |
464 | entry_updated: 'مقاله بهروز شد' | 464 | entry_updated: 'مقاله بهروز شد' |
465 | entry_reloaded: 'مقاله بهروز شد' | 465 | entry_reloaded: 'مقاله بهروز شد' |
466 | # entry_reload_failed: 'Entry reloaded but fetching content failed' | 466 | # entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
467 | entry_archived: 'مقاله بایگانی شد' | 467 | entry_archived: 'مقاله بایگانی شد' |
468 | entry_unarchived: 'مقاله از بایگانی درآمد' | 468 | entry_unarchived: 'مقاله از بایگانی درآمد' |
469 | entry_starred: 'مقاله برگزیده شد' | 469 | entry_starred: 'مقاله برگزیده شد' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 098bc9ff..6d85a5ae 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | entry_saved_failed: 'Article enregistré mais impossible de récupérer le contenu' | 464 | entry_saved_failed: 'Article enregistré mais impossible de récupérer le contenu' |
465 | entry_updated: 'Article mis à jour' | 465 | entry_updated: 'Article mis à jour' |
466 | entry_reloaded: 'Article rechargé' | 466 | entry_reloaded: 'Article rechargé' |
467 | entry_reload_failed: "Article mis à jour mais impossible de récupérer le contenu" | 467 | entry_reloaded_failed: "Article mis à jour mais impossible de récupérer le contenu" |
468 | entry_archived: 'Article marqué comme lu' | 468 | entry_archived: 'Article marqué comme lu' |
469 | entry_unarchived: 'Article marqué comme non lu' | 469 | entry_unarchived: 'Article marqué comme non lu' |
470 | entry_starred: 'Article ajouté dans les favoris' | 470 | entry_starred: 'Article ajouté dans les favoris' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 390a4b60..15f7e774 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | # entry_saved_failed: 'Entry saved but fetching content failed' | 464 | # entry_saved_failed: 'Entry saved but fetching content failed' |
465 | entry_updated: 'Contenuto aggiornato' | 465 | entry_updated: 'Contenuto aggiornato' |
466 | entry_reloaded: 'Contenuto ricaricato' | 466 | entry_reloaded: 'Contenuto ricaricato' |
467 | # entry_reload_failed: 'Entry reloaded but fetching content failed' | 467 | # entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
468 | entry_archived: 'Contenuto archiviato' | 468 | entry_archived: 'Contenuto archiviato' |
469 | entry_unarchived: 'Contenuto dis-archiviato' | 469 | entry_unarchived: 'Contenuto dis-archiviato' |
470 | entry_starred: 'Contenuto segnato come preferito' | 470 | entry_starred: 'Contenuto segnato come preferito' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 990938a6..1d10be2a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | entry_saved_failed: 'Article salvat mai fracàs de la recuperacion del contengut' | 464 | entry_saved_failed: 'Article salvat mai fracàs de la recuperacion del contengut' |
465 | entry_updated: 'Article mes a jorn' | 465 | entry_updated: 'Article mes a jorn' |
466 | entry_reloaded: 'Article recargat' | 466 | entry_reloaded: 'Article recargat' |
467 | entry_reload_failed: "L'article es estat cargat de nòu mai la recuperacion del contengut a fracassat" | 467 | entry_reloaded_failed: "L'article es estat cargat de nòu mai la recuperacion del contengut a fracassat" |
468 | entry_archived: 'Article marcat coma legit' | 468 | entry_archived: 'Article marcat coma legit' |
469 | entry_unarchived: 'Article marcat coma pas legit' | 469 | entry_unarchived: 'Article marcat coma pas legit' |
470 | entry_starred: 'Article apondut dins los favorits' | 470 | entry_starred: 'Article apondut dins los favorits' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 6dd79641..9791a3b2 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | entry_saved_failed: 'Wpis zapisany, ale wystąpił bład pobierania treści' | 464 | entry_saved_failed: 'Wpis zapisany, ale wystąpił bład pobierania treści' |
465 | entry_updated: 'Wpis zaktualizowany' | 465 | entry_updated: 'Wpis zaktualizowany' |
466 | entry_reloaded: 'Wpis ponownie załadowany' | 466 | entry_reloaded: 'Wpis ponownie załadowany' |
467 | entry_reload_failed: 'Wpis ponownie załadowany, ale wystąpił bład pobierania treści' | 467 | entry_reloaded_failed: 'Wpis ponownie załadowany, ale wystąpił bład pobierania treści' |
468 | entry_archived: 'Wpis dodany do archiwum' | 468 | entry_archived: 'Wpis dodany do archiwum' |
469 | entry_unarchived: 'Wpis usunięty z archiwum' | 469 | entry_unarchived: 'Wpis usunięty z archiwum' |
470 | entry_starred: 'Wpis oznaczony gwiazdką' | 470 | entry_starred: 'Wpis oznaczony gwiazdką' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index a8d625d2..2b1d4f6d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -464,7 +464,7 @@ flashes: | |||
464 | # entry_saved_failed: 'Entry saved but fetching content failed' | 464 | # entry_saved_failed: 'Entry saved but fetching content failed' |
465 | # entry_updated: 'Entry updated' | 465 | # entry_updated: 'Entry updated' |
466 | # entry_reloaded: 'Entry reloaded' | 466 | # entry_reloaded: 'Entry reloaded' |
467 | # entry_reload_failed: 'Entry reloaded but fetching content failed' | 467 | # entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
468 | entry_archived: 'Articol arhivat' | 468 | entry_archived: 'Articol arhivat' |
469 | entry_unarchived: 'Articol dezarhivat' | 469 | entry_unarchived: 'Articol dezarhivat' |
470 | entry_starred: 'Articol adăugat la favorite' | 470 | entry_starred: 'Articol adăugat la favorite' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index bcfd8ad4..8cfc245a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -463,7 +463,7 @@ flashes: | |||
463 | # entry_saved_failed: 'Entry saved but fetching content failed' | 463 | # entry_saved_failed: 'Entry saved but fetching content failed' |
464 | # entry_updated: 'Entry updated' | 464 | # entry_updated: 'Entry updated' |
465 | entry_reloaded: 'Makale içeriği yenilendi' | 465 | entry_reloaded: 'Makale içeriği yenilendi' |
466 | # entry_reload_failed: 'Entry reloaded but fetching content failed' | 466 | # entry_reloaded_failed: 'Entry reloaded but fetching content failed' |
467 | entry_archived: 'Makale arşivlendi' | 467 | entry_archived: 'Makale arşivlendi' |
468 | entry_unarchived: 'Makale arşivden çıkartıldı' | 468 | entry_unarchived: 'Makale arşivden çıkartıldı' |
469 | entry_starred: 'Makale favorilere eklendi' | 469 | entry_starred: 'Makale favorilere eklendi' |