]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Add some deletion confirmation to avoid mistake
authorJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 24 May 2017 19:33:37 +0000 (21:33 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 24 May 2017 19:33:37 +0000 (21:33 +0200)
17 files changed:
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig

index 1bd0b8fdd7be155d573572250350fc09d9fb7341..3e64af8f45d3af64695384793f9006f8b0acbeac 100644 (file)
@@ -240,6 +240,9 @@ entry:
         save_label: 'Gem'
     public:
         # shared_by_wallabag: "This article has been shared by <a href=%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'Om'
index 94bb329517648e3084ce747149ae7a6a638fd91e..6472e64b9b0e57a6ab7fbcdb421dfebfe9ed161f 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Speichern'
     public:
         shared_by_wallabag: "Dieser Artikel wurde mittels <a href='%wallabag_instance%'>wallabag</a> geteilt"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'Über'
index 3a006a0ec28c4484447e0ed1c046d89739c905d7..8703a0e54475f343b3095051e562a5e22be79b36 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Save'
     public:
         shared_by_wallabag: "This article has been shared by <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        delete: "Are you sure you want to remove that article?"
+        delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'About'
index ca5d9b2c0aa74b352a847159e33c899275370267..0f2a4a7b207c55494c4ce8bbb8cd1b4d0a1b4518 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Guardar'
     public:
         shared_by_wallabag: "Este artículo se ha compartido con <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'Acerca de'
index ecd8f64d0e8162c1eb0a7eade9829662cf6f5ca6..ec7a43627076b50307ea2739cc72bc1caa6cbb1a 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'ذخیره'
     public:
         # shared_by_wallabag: "This article has been shared by <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'درباره'
index 84706459d078a52c610b9e9e6fcee5ac489ed3e6..6969b67b68d8b1fd05921b0ff2e236882774f6a6 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: "Enregistrer"
     public:
         shared_by_wallabag: "Cet article a été partagé par <a href=\"%wallabag_instance%\">wallabag</a>"
+    confirm:
+        delete: "Voulez-vous vraiment supprimer cet article ?"
+        delete_tag: "Voulez-vous vraiment supprimer ce tag de cet article ?"
 
 about:
     page_title: "À propos"
index a8baa96fd6fee0189eaad7b9bd7c6a5ac1b27686..70e9575a158d172e463fa05fe4299a0413826218 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Salva'
     public:
         # shared_by_wallabag: "This article has been shared by <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'About'
index 8f39ce0569ba532b68b2bfcbf0739a17d0af8b8f..3ac472d03731651802a2025d9fb7bf58dbe5dae3 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Enregistrar'
     public:
         shared_by_wallabag: "Aqueste article es estat partejat per <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'A prepaus'
index a6e0c10fd127c7d4a207f09c69cdc02af08a6744..c338e63fe88d5adf7032a212c3351668ef0eefdb 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Zapisz'
     public:
         shared_by_wallabag: "Ten artykuł został udostępniony przez <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'O nas'
index a9473591f391139f87d843c8a7ed10126e99fa61..bf038ee878260164bb06335acd59fbd4d9a17d83 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Salvar'
     public:
         shared_by_wallabag: "Este artigo foi compartilhado pelo <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'Sobre'
index 80d78a01e491c60cbd02c626c280e5db7786e4a0..bd66d83a03547edd50f2e62e5e62cf2c7c906f4f 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Salvează'
     public:
         # shared_by_wallabag: "This article has been shared by <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'Despre'
index 2896c82344900f89465bee857ae5012ec729965d..b86c4003252416738408a7ce7e6dd5741c6d105b 100644 (file)
@@ -241,6 +241,9 @@ entry:
         save_label: 'Kaydet'
     public:
         # shared_by_wallabag: "This article has been shared by <a href='%wallabag_instance%'>wallabag</a>"
+    confirm:
+        # delete: "Are you sure you want to remove that article?"
+        # delete_tag: "Are you sure you want to remove that tag from that article?"
 
 about:
     page_title: 'Hakkımızda'
index bdd44b54499b10950097331f380ed1fcc1d4d62e..0ba6f4f48371bbada89e51027550159141a1b43d 100644 (file)
@@ -50,7 +50,7 @@
                 <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}"><span>{{ entry.domainName|removeWww }}</span></a></li>
                 <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">check</i><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>
                 <li><a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">star_rate</i><span>{{ 'entry.list.toogle_as_star'|trans }}</span></a></li>
-                <li><a title="{{ 'entry.list.delete'|trans }}" class="tool icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">delete</i><span>{{ 'entry.list.delete'|trans }}</span></a></li>
+                <li><a title="{{ 'entry.list.delete'|trans }}" class="tool icon" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">delete</i><span>{{ 'entry.list.delete'|trans }}</span></a></li>
             </ul>
             {% if (entry.previewPicture is null or listMode == 1) %}
                 <ul class="card-entry-tags">
index 660211f2562bb30e8011804531234abc8c848fd8..3d20a6bc92418ea3c5e905c3d0f02a5796537375 100644 (file)
@@ -22,7 +22,7 @@
                 <li><a title="{{ markAsReadLabel|trans }}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %} markasread" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ markAsReadLabel|trans }}</span></a></li>
                 <li><a title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %} favorite" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li>
                 <li><a id="nav-btn-add-tag" class="tool icon icon-price-tags" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li>
-                <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
+                <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
                 {% if craue_setting('share_public') %}
                     <li><a href="{{ path('share', {'id': entry.id }) }}" target="_blank" class="tool icon icon-eye" title="{{ 'entry.view.left_menu.public_link'|trans }}"><span>{{ 'entry.view.left_menu.public_link'|trans }}</span></a></li>
                     <li><a href="{{ path('delete_share', {'id': entry.id }) }}" class="tool icon icon-no-eye" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}"><span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span></a></li>
             <aside class="tags">
                 <div class="card-entry-tags">
                 {% for tag in entry.tags %}
-                    <span class="label-outline"><i class="material-icons">label_outline</i> <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" class="nostyle"><i>✘</i></a></span>
+                    <span class="label-outline">
+                        <i class="material-icons">label_outline</i>
+                        <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
+                        <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')" class="nostyle">
+                            <i>✘</i>
+                        </a>
+                    </span>
                 {% endfor %}
                 </div>
                 <div class="input-field baggy-add-tag" style="display: none">
index d278da1b91d988bc31073b24abf6b3ad1d9e49fc..468338ace9b944c7d1d0f193472f4f8717c6991f 100644 (file)
@@ -9,7 +9,7 @@
         <li>
             <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
             <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
-            <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
+            <a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
         </li>
     </ul>
 </div>
index 3ba6253abd15ae5572f1caba72be57eccfd0bbfe..174b7b54c3e0727520927539a09380b1fcdc63ee 100644 (file)
@@ -10,7 +10,7 @@
                 <li>
                     <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
                     <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
-                    <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
+                    <a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
                 </li>
             </ul>
         </div>
index 58e08cbcbb4479793a47fe483b338204e042cf13..4cff7bf2db489491618b6a61eb35c31086366ec4 100644 (file)
@@ -82,7 +82,7 @@
             <div class="collapsible-body"></div>
         </li>
         <li class="bold border-bottom">
-            <a class="waves-effect collapsible-header delete" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
+            <a class="waves-effect collapsible-header delete" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
                 <i class="material-icons small">delete</i>
                 <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
             </a>
                 <ul class="tags">
                     {% for tag in entry.tags %}
                         <li class="chip">
-                            <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons vertical-align-middle">delete</i></a>
+                            <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
+                            <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')">
+                                <i class="material-icons vertical-align-middle">delete</i>
+                            </a>
                         </li>
                     {% endfor %}
                 </ul>
             <ul>
               <li><a class="btn-floating" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">done</i></a></li>
               <li><a class="btn-floating" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">star_outline</i></a></li>
-              <li><a class="btn-floating" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a></li>
+              <li><a class="btn-floating" href="{{ path('delete_entry', { 'id': entry.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')"><i class="material-icons">delete</i></a></li>
             </ul>
         </div>
     </div>