diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 09:26:32 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-22 13:13:06 +0200 |
commit | 206bade58a279d7f2e34c2dbada10366b90d2d6b (patch) | |
tree | 6c5fc1fe65dfa9e661a09b3fd92253f2931b84de /src/Wallabag | |
parent | e8331dd9e7772a396bb211459eca4a682c8e947e (diff) | |
download | wallabag-206bade58a279d7f2e34c2dbada10366b90d2d6b.tar.gz wallabag-206bade58a279d7f2e34c2dbada10366b90d2d6b.tar.zst wallabag-206bade58a279d7f2e34c2dbada10366b90d2d6b.zip |
Add ability to reset some datas
- annotations
- tags
- entries
Diffstat (limited to 'src/Wallabag')
16 files changed, 207 insertions, 22 deletions
diff --git a/src/Wallabag/AnnotationBundle/Entity/Annotation.php b/src/Wallabag/AnnotationBundle/Entity/Annotation.php index c48d8731..0838f5aa 100644 --- a/src/Wallabag/AnnotationBundle/Entity/Annotation.php +++ b/src/Wallabag/AnnotationBundle/Entity/Annotation.php | |||
@@ -82,7 +82,7 @@ class Annotation | |||
82 | * @Exclude | 82 | * @Exclude |
83 | * | 83 | * |
84 | * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="annotations") | 84 | * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="annotations") |
85 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id") | 85 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="cascade") |
86 | */ | 86 | */ |
87 | private $entry; | 87 | private $entry; |
88 | 88 | ||
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index abd35c02..ccbf550a 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -225,6 +225,48 @@ class ConfigController extends Controller | |||
225 | } | 225 | } |
226 | 226 | ||
227 | /** | 227 | /** |
228 | * Remove all annotations OR tags OR entries for the current user. | ||
229 | * | ||
230 | * @Route("/reset/{type}", requirements={"id" = "annotations|tags|entries"}, name="config_reset") | ||
231 | * | ||
232 | * @return RedirectResponse | ||
233 | */ | ||
234 | public function resetAction($type) | ||
235 | { | ||
236 | $em = $this->getDoctrine()->getManager(); | ||
237 | |||
238 | switch ($type) { | ||
239 | case 'annotations': | ||
240 | $em->createQuery('DELETE FROM Wallabag\AnnotationBundle\Entity\Annotation a WHERE a.user = '.$this->getUser()->getId()) | ||
241 | ->execute(); | ||
242 | break; | ||
243 | |||
244 | case 'tags': | ||
245 | $tags = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findAllTags($this->getUser()->getId()); | ||
246 | |||
247 | if (empty($tags)) { | ||
248 | break; | ||
249 | } | ||
250 | |||
251 | $this->getDoctrine() | ||
252 | ->getRepository('WallabagCoreBundle:Entry') | ||
253 | ->removeTags($this->getUser()->getId(), $tags); | ||
254 | break; | ||
255 | |||
256 | case 'entries': | ||
257 | $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = '.$this->getUser()->getId()) | ||
258 | ->execute(); | ||
259 | } | ||
260 | |||
261 | $this->get('session')->getFlashBag()->add( | ||
262 | 'notice', | ||
263 | 'flashes.config.notice.'.$type.'_reset' | ||
264 | ); | ||
265 | |||
266 | return $this->redirect($this->generateUrl('config').'#set3'); | ||
267 | } | ||
268 | |||
269 | /** | ||
228 | * Validate that a rule can be edited/deleted by the current user. | 270 | * Validate that a rule can be edited/deleted by the current user. |
229 | * | 271 | * |
230 | * @param TaggingRule $rule | 272 | * @param TaggingRule $rule |
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f2da3f4d..dd49acf0 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -190,10 +190,10 @@ class Entry | |||
190 | * @ORM\JoinTable( | 190 | * @ORM\JoinTable( |
191 | * name="entry_tag", | 191 | * name="entry_tag", |
192 | * joinColumns={ | 192 | * joinColumns={ |
193 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id") | 193 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="cascade") |
194 | * }, | 194 | * }, |
195 | * inverseJoinColumns={ | 195 | * inverseJoinColumns={ |
196 | * @ORM\JoinColumn(name="tag_id", referencedColumnName="id") | 196 | * @ORM\JoinColumn(name="tag_id", referencedColumnName="id", onDelete="cascade") |
197 | * } | 197 | * } |
198 | * ) | 198 | * ) |
199 | */ | 199 | */ |
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index e76878d4..69661b12 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php | |||
@@ -53,6 +53,23 @@ class TagRepository extends EntityRepository | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Find all tags. | ||
57 | * | ||
58 | * @param int $userId | ||
59 | * | ||
60 | * @return array | ||
61 | */ | ||
62 | public function findAllTags($userId) | ||
63 | { | ||
64 | return $this->createQueryBuilder('t') | ||
65 | ->select('t') | ||
66 | ->leftJoin('t.entries', 'e') | ||
67 | ->where('e.user = :userId')->setParameter('userId', $userId) | ||
68 | ->getQuery() | ||
69 | ->getResult(); | ||
70 | } | ||
71 | |||
72 | /** | ||
56 | * Used only in test case to get a tag for our entry. | 73 | * Used only in test case to get a tag for our entry. |
57 | * | 74 | * |
58 | * @return Tag | 75 | * @return Tag |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index f5548a21..7c8ae66e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'Emailadresse' | 89 | email_label: 'Emailadresse' |
90 | # twoFactorAuthentication_label: 'Two factor authentication' | 90 | # twoFactorAuthentication_label: 'Two factor authentication' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Gammel adgangskode' | 104 | old_password_label: 'Gammel adgangskode' |
98 | new_password_label: 'Ny adgangskode' | 105 | new_password_label: 'Ny adgangskode' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | # tagging_rules_deleted: 'Tagging rule deleted' | 469 | # tagging_rules_deleted: 'Tagging rule deleted' |
463 | # user_added: 'User "%username%" added' | 470 | # user_added: 'User "%username%" added' |
464 | # rss_token_updated: 'RSS token updated' | 471 | # rss_token_updated: 'RSS token updated' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | # entry_already_saved: 'Entry already saved on %date%' | 477 | # entry_already_saved: 'Entry already saved on %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 9edd7fb7..20f9753b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'E-Mail-Adresse' | 89 | email_label: 'E-Mail-Adresse' |
90 | twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung' | 90 | twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Altes Kennwort' | 104 | old_password_label: 'Altes Kennwort' |
98 | new_password_label: 'Neues Kennwort' | 105 | new_password_label: 'Neues Kennwort' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | tagging_rules_deleted: 'Tagging-Regel gelöscht' | 469 | tagging_rules_deleted: 'Tagging-Regel gelöscht' |
463 | user_added: 'Benutzer "%username%" erstellt' | 470 | user_added: 'Benutzer "%username%" erstellt' |
464 | rss_token_updated: 'RSS-Token aktualisiert' | 471 | rss_token_updated: 'RSS-Token aktualisiert' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | entry_already_saved: 'Eintrag bereits am %date% gespeichert' | 477 | entry_already_saved: 'Eintrag bereits am %date% gespeichert' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index b86145a0..35dde535 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'Email' | 89 | email_label: 'Email' |
90 | twoFactorAuthentication_label: 'Two factor authentication' | 90 | twoFactorAuthentication_label: 'Two factor authentication' |
91 | delete: | 91 | delete: |
92 | title: Delete my account (danger zone !) | 92 | title: Delete my account (a.k.a danger zone) |
93 | description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | confirm: Are you really sure? (it can't be UNDONE) | 94 | confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | button: Delete my account | 95 | button: Delete my account |
96 | reset: | ||
97 | title: Reset area (a.k.a danger zone) | ||
98 | description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | annotations: Remove ALL annotations | ||
100 | tags: Remove ALL tags | ||
101 | entries: Remove ALL entries | ||
102 | confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Current password' | 104 | old_password_label: 'Current password' |
98 | new_password_label: 'New password' | 105 | new_password_label: 'New password' |
@@ -461,6 +468,9 @@ flashes: | |||
461 | tagging_rules_updated: 'Tagging rules updated' | 468 | tagging_rules_updated: 'Tagging rules updated' |
462 | tagging_rules_deleted: 'Tagging rule deleted' | 469 | tagging_rules_deleted: 'Tagging rule deleted' |
463 | rss_token_updated: 'RSS token updated' | 470 | rss_token_updated: 'RSS token updated' |
471 | annotations_reset: Annotations reset | ||
472 | tags_reset: Tags reset | ||
473 | entries_reset: Entries reset | ||
464 | entry: | 474 | entry: |
465 | notice: | 475 | notice: |
466 | entry_already_saved: 'Entry already saved on %date%' | 476 | entry_already_saved: 'Entry already saved on %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index b7187f50..13f2e977 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'Direccion e-mail' | 89 | email_label: 'Direccion e-mail' |
90 | twoFactorAuthentication_label: 'Autentificación de dos factores' | 90 | twoFactorAuthentication_label: 'Autentificación de dos factores' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Contraseña actual' | 104 | old_password_label: 'Contraseña actual' |
98 | new_password_label: 'Nueva contraseña' | 105 | new_password_label: 'Nueva contraseña' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | tagging_rules_deleted: 'Regla de etiquetado actualizada' | 469 | tagging_rules_deleted: 'Regla de etiquetado actualizada' |
463 | user_added: 'Usuario "%username%" añadido' | 470 | user_added: 'Usuario "%username%" añadido' |
464 | rss_token_updated: 'RSS token actualizado' | 471 | rss_token_updated: 'RSS token actualizado' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | entry_already_saved: 'Entrada ya guardada por %fecha%' | 477 | entry_already_saved: 'Entrada ya guardada por %fecha%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 0751752b..5ee1f62d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'نشانی ایمیل' | 89 | email_label: 'نشانی ایمیل' |
90 | twoFactorAuthentication_label: 'تأیید ۲مرحلهای' | 90 | twoFactorAuthentication_label: 'تأیید ۲مرحلهای' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'رمز قدیمی' | 104 | old_password_label: 'رمز قدیمی' |
98 | new_password_label: 'رمز تازه' | 105 | new_password_label: 'رمز تازه' |
@@ -461,6 +468,9 @@ flashes: | |||
461 | tagging_rules_deleted: 'قانون برچسبگذاری پاک شد' | 468 | tagging_rules_deleted: 'قانون برچسبگذاری پاک شد' |
462 | user_added: 'کابر "%username%" افزوده شد' | 469 | user_added: 'کابر "%username%" افزوده شد' |
463 | rss_token_updated: 'کد آر-اس-اس بهروز شد' | 470 | rss_token_updated: 'کد آر-اس-اس بهروز شد' |
471 | # annotations_reset: Annotations reset | ||
472 | # tags_reset: Tags reset | ||
473 | # entries_reset: Entries reset | ||
464 | entry: | 474 | entry: |
465 | notice: | 475 | notice: |
466 | entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود' | 476 | entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 8d19ccb1..7a98f133 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -91,8 +91,15 @@ config: | |||
91 | delete: | 91 | delete: |
92 | title: Supprimer mon compte (attention danger !) | 92 | title: Supprimer mon compte (attention danger !) |
93 | description: Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c'est IRRÉVERSIBLE). Vous serez ensuite déconnecté. | 93 | description: Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c'est IRRÉVERSIBLE). Vous serez ensuite déconnecté. |
94 | confirm: Vous êtes vraiment sûr ? (c'est IRRÉVERSIBLE !) | 94 | confirm: Vous êtes vraiment sûr ? (C'EST IRREVERSIBLE) |
95 | button: 'Supprimer mon compte' | 95 | button: 'Supprimer mon compte' |
96 | reset: | ||
97 | title: Réinitialisation (attention danger !) | ||
98 | description: En cliquant sur les boutons ci-dessous vous avez la possibilité de supprimer certaines informations de votre compte. Attention, ces actions sont IRREVERSIBLES ! | ||
99 | annotations: Supprimer TOUTES les annotations | ||
100 | tags: Supprimer TOUS les tags | ||
101 | entries: Supprimer TOUS les articles | ||
102 | confirm: Êtes-vous vraiment vraiment sûr ? (C'EST IRREVERSIBLE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Mot de passe actuel' | 104 | old_password_label: 'Mot de passe actuel' |
98 | new_password_label: 'Nouveau mot de passe' | 105 | new_password_label: 'Nouveau mot de passe' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | tagging_rules_deleted: 'Règle supprimée' | 469 | tagging_rules_deleted: 'Règle supprimée' |
463 | user_added: 'Utilisateur "%username%" ajouté' | 470 | user_added: 'Utilisateur "%username%" ajouté' |
464 | rss_token_updated: 'Jeton RSS mis à jour' | 471 | rss_token_updated: 'Jeton RSS mis à jour' |
472 | annotations_reset: Annotations supprimées | ||
473 | tags_reset: Tags supprimés | ||
474 | entries_reset: Articles supprimés | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | entry_already_saved: 'Article déjà sauvergardé le %date%' | 477 | entry_already_saved: 'Article déjà sauvergardé le %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 4d3452ea..bc4448bd 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'E-mail' | 89 | email_label: 'E-mail' |
90 | twoFactorAuthentication_label: 'Two factor authentication' | 90 | twoFactorAuthentication_label: 'Two factor authentication' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Password corrente' | 104 | old_password_label: 'Password corrente' |
98 | new_password_label: 'Nuova password' | 105 | new_password_label: 'Nuova password' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | tagging_rules_deleted: 'Regola di tagging aggiornate' | 469 | tagging_rules_deleted: 'Regola di tagging aggiornate' |
463 | user_added: 'Utente "%username%" aggiunto' | 470 | user_added: 'Utente "%username%" aggiunto' |
464 | rss_token_updated: 'RSS token aggiornato' | 471 | rss_token_updated: 'RSS token aggiornato' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | entry_already_saved: 'Contenuto già salvato in data %date%' | 477 | entry_already_saved: 'Contenuto già salvato in data %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index f14213c6..7d1a801a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'Adreça de corrièl' | 89 | email_label: 'Adreça de corrièl' |
90 | twoFactorAuthentication_label: 'Dobla autentificacion' | 90 | twoFactorAuthentication_label: 'Dobla autentificacion' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Senhal actual' | 104 | old_password_label: 'Senhal actual' |
98 | new_password_label: 'Senhal novèl' | 105 | new_password_label: 'Senhal novèl' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | tagging_rules_deleted: 'Règla suprimida' | 469 | tagging_rules_deleted: 'Règla suprimida' |
463 | user_added: 'Utilizaire "%username%" ajustat' | 470 | user_added: 'Utilizaire "%username%" ajustat' |
464 | rss_token_updated: 'Geton RSS mes a jorn' | 471 | rss_token_updated: 'Geton RSS mes a jorn' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | entry_already_saved: 'Article ja salvargardat lo %date%' | 477 | entry_already_saved: 'Article ja salvargardat lo %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 6f22f90d..b05a9dfd 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -93,6 +93,13 @@ config: | |||
93 | description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. | 93 | description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. |
94 | confirm: Jesteś pewien? (tej operacji NIE MOŻNA cofnąć) | 94 | confirm: Jesteś pewien? (tej operacji NIE MOŻNA cofnąć) |
95 | button: Usuń moje konto | 95 | button: Usuń moje konto |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Stare hasło' | 104 | old_password_label: 'Stare hasło' |
98 | new_password_label: 'Nowe hasło' | 105 | new_password_label: 'Nowe hasło' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | tagging_rules_deleted: 'Reguła tagowania usunięta' | 469 | tagging_rules_deleted: 'Reguła tagowania usunięta' |
463 | user_added: 'Użytkownik "%username%" dodany' | 470 | user_added: 'Użytkownik "%username%" dodany' |
464 | rss_token_updated: 'Token kanału RSS zaktualizowany' | 471 | rss_token_updated: 'Token kanału RSS zaktualizowany' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | entry_already_saved: 'Wpis już został dodany %date%' | 477 | entry_already_saved: 'Wpis już został dodany %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 29db9c3e..571452c0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'E-mail' | 89 | email_label: 'E-mail' |
90 | # twoFactorAuthentication_label: 'Two factor authentication' | 90 | # twoFactorAuthentication_label: 'Two factor authentication' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Parola veche' | 104 | old_password_label: 'Parola veche' |
98 | new_password_label: 'Parola nouă' | 105 | new_password_label: 'Parola nouă' |
@@ -462,6 +469,9 @@ flashes: | |||
462 | # tagging_rules_deleted: 'Tagging rule deleted' | 469 | # tagging_rules_deleted: 'Tagging rule deleted' |
463 | # user_added: 'User "%username%" added' | 470 | # user_added: 'User "%username%" added' |
464 | # rss_token_updated: 'RSS token updated' | 471 | # rss_token_updated: 'RSS token updated' |
472 | # annotations_reset: Annotations reset | ||
473 | # tags_reset: Tags reset | ||
474 | # entries_reset: Entries reset | ||
465 | entry: | 475 | entry: |
466 | notice: | 476 | notice: |
467 | # entry_already_saved: 'Entry already saved on %date%' | 477 | # entry_already_saved: 'Entry already saved on %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 41e8e576..8e429653 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -89,10 +89,17 @@ config: | |||
89 | email_label: 'E-posta' | 89 | email_label: 'E-posta' |
90 | twoFactorAuthentication_label: 'İki adımlı doğrulama' | 90 | twoFactorAuthentication_label: 'İki adımlı doğrulama' |
91 | delete: | 91 | delete: |
92 | # title: Delete my account (danger zone !) | 92 | # title: Delete my account (a.k.a danger zone) |
93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. | 93 | # description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out. |
94 | # confirm: Are you really sure? (it can't be UNDONE) | 94 | # confirm: Are you really sure? (THIS CAN'T BE UNDONE) |
95 | # button: Delete my account | 95 | # button: Delete my account |
96 | reset: | ||
97 | # title: Reset area (a.k.a danger zone) | ||
98 | # description: By hiting buttons below you'll have ability to remove some informations from your account. Be aware that these actions are IRREVERSIBLE. | ||
99 | # annotations: Remove ALL annotations | ||
100 | # tags: Remove ALL tags | ||
101 | # entries: Remove ALL entries | ||
102 | # confirm: Are you really really sure? (THIS CAN'T BE UNDONE) | ||
96 | form_password: | 103 | form_password: |
97 | old_password_label: 'Eski şifre' | 104 | old_password_label: 'Eski şifre' |
98 | new_password_label: 'Yeni şifre' | 105 | new_password_label: 'Yeni şifre' |
@@ -461,6 +468,9 @@ flashes: | |||
461 | tagging_rules_deleted: 'Tagging rule deleted' | 468 | tagging_rules_deleted: 'Tagging rule deleted' |
462 | user_added: 'User "%username%" added' | 469 | user_added: 'User "%username%" added' |
463 | rss_token_updated: 'RSS token updated' | 470 | rss_token_updated: 'RSS token updated' |
471 | # annotations_reset: Annotations reset | ||
472 | # tags_reset: Tags reset | ||
473 | # entries_reset: Entries reset | ||
464 | entry: | 474 | entry: |
465 | notice: | 475 | notice: |
466 | entry_already_saved: 'Entry already saved on %date%' | 476 | entry_already_saved: 'Entry already saved on %date%' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index 8434508d..79826e0f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig | |||
@@ -168,6 +168,22 @@ | |||
168 | {{ form_widget(form.user._token) }} | 168 | {{ form_widget(form.user._token) }} |
169 | </form> | 169 | </form> |
170 | 170 | ||
171 | <br /><hr /><br /> | ||
172 | |||
173 | <div class="row"> | ||
174 | <h5>{{ 'config.reset.title'|trans }}</h5> | ||
175 | <p>{{ 'config.reset.description'|trans }}</p> | ||
176 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
177 | {{ 'config.reset.annotations'|trans }} | ||
178 | </a> | ||
179 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
180 | {{ 'config.reset.tags'|trans }} | ||
181 | </a> | ||
182 | <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
183 | {{ 'config.reset.entries'|trans }} | ||
184 | </a> | ||
185 | </div> | ||
186 | |||
171 | {% if enabled_users > 1 %} | 187 | {% if enabled_users > 1 %} |
172 | <br /><hr /><br /> | 188 | <br /><hr /><br /> |
173 | 189 | ||