]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Remove link when there are no untagged articles 3993/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Thu, 6 Jun 2019 11:34:20 +0000 (13:34 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Thu, 6 Jun 2019 11:34:20 +0000 (13:34 +0200)
17 files changed:
src/Wallabag/CoreBundle/Controller/TagController.php
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.ru.yml
src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig

index 91f34b3de1871ccc5e6825bdf286c5d3fdb4e5b7..90d36d71ae28da3f43ea6795e28f556396626003 100644 (file)
@@ -87,7 +87,7 @@ class TagController extends Controller
     {
         $tags = $this->get('wallabag_core.tag_repository')
             ->findAllFlatTagsWithNbEntries($this->getUser()->getId());
-        $untagged = $this->get('wallabag_core.entry_repository')
+        $nbEntriesUntagged = $this->get('wallabag_core.entry_repository')
             ->countUntaggedEntriesByUser($this->getUser()->getId());
 
         $renameForms = [];
@@ -98,7 +98,7 @@ class TagController extends Controller
         return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [
             'tags' => $tags,
             'renameForms' => $renameForms,
-            'untagged' => $untagged,
+            'nbEntriesUntagged' => $nbEntriesUntagged,
         ]);
     }
 
index e04c2ff1c7b0b2996596fe5d89accc898bbcdb50..a01c7688e09f257b17dc8a85b80d80c70d8fb676 100644 (file)
@@ -420,6 +420,7 @@ tag:
     list:
         # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
         # see_untagged_entries: 'See untagged entries'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
index 5a9668a9ab32ab134d6cd287db1787cc3872ccd1..a1b41855610e7405b0d26cc5f0aa49457bb88066 100644 (file)
@@ -411,6 +411,7 @@ tag:
     list:
         number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.'
         see_untagged_entries: 'Zeige nicht getaggte Einträge'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Hinzufügen'
         placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.'
index e2994f539ba653cb97e79c94d39c63482e364b15..020cd08a63d1c291cea31912356a2dfe658bd1e6 100644 (file)
@@ -420,6 +420,7 @@ tag:
     list:
         number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
         see_untagged_entries: 'See untagged entries'
+        no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Add'
         placeholder: 'You can add several tags, separated by a comma.'
index d1ccfc81f4727ac4a86bfab5501b11e0ac2576cb..130c12f3e380e9eb4d8d9e9bf4c26688e9688336 100644 (file)
@@ -420,6 +420,7 @@ tag:
     list:
         number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.'
         see_untagged_entries: 'Ver artículos sin etiquetas'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Añadir'
         placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.'
index e5d36bd331a06d91b049fdf0d4f5ce709eaa6a89..31db51fa1bfac2ea23b4ff67e96d76cffbdfd670 100644 (file)
@@ -420,6 +420,7 @@ tag:
     list:
         number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.'
         # see_untagged_entries: 'See untagged entries'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
index 0b1853a4ebeb0d6b08f93f43308e16967e799706..df3692dc8008706775ca5871714ec85ce279116a 100644 (file)
@@ -420,6 +420,7 @@ tag:
     list:
         number_on_the_page: "{0} Il n’y a pas de tag.|{1} Il y a un tag.|]1,Inf[ Il y a %count% tags."
         see_untagged_entries: "Voir les articles sans tag"
+        no_untagged_entries: 'Aucun article sans tag.'
     new:
         add: "Ajouter"
         placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule."
index 0474d2bc6b3afa5ec50fa26d9038cede4d20dafd..337a1bfae8f091aa1904ec3f2d081044cb72bacc 100644 (file)
@@ -419,6 +419,7 @@ tag:
     list:
         number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette."
         see_untagged_entries: 'Vedi articoli non etichettati'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Aggiungi'
         placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.'
index e761832e2141efa4abfda030220a9015f9853029..fc0a03b55d74e5a89e17a0a5e0f8a14e40e283b6 100644 (file)
@@ -419,6 +419,7 @@ tag:
     list:
         number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas."
         see_untagged_entries: "Afichar las entradas sens etiquetas"
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Ajustar'
         placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula."
index f3d506e556e8ef240dfc03a628e7cb8000545293..f9609ea2c90ba8b60f852a5d1c84697d6c332ee7 100644 (file)
@@ -419,6 +419,7 @@ tag:
     list:
         number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.'
         see_untagged_entries: 'Zobacz nieotagowane wpisy'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Dodaj'
         placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.'
index 6ddc1fc1ff87e34ae70f3d749a627185b7b8418f..e9d3a6cf0b9978ced6a789d8c01559e765168d25 100644 (file)
@@ -419,6 +419,7 @@ tag:
     list:
         number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.'
         see_untagged_entries: 'Ver entradas sem tags'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
index 8c0791f0ba12eeb93070d4c25b383844c7471e29..dde0c9a107cf3993b729e6310152c0b48b54a3cd 100644 (file)
@@ -419,6 +419,7 @@ tag:
     list:
         # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
         # see_untagged_entries: 'See untagged entries'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
index 2ee2d83abc979228a17da15dd91caf4f5748227e..8dcba74b2e0bd1860f3d73c89234571b99ed2921 100644 (file)
@@ -407,6 +407,7 @@ tag:
     list:
         number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.'
         see_untagged_entries: 'Просмотреть записи без тегов'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'Добавить'
         placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.'
index 967ae427d6376671433a2fb21929c899f16fff27..8dc65dd63dbeccb1cfae7730f0c924d6bb71c95b 100644 (file)
@@ -417,6 +417,7 @@ tag:
     list:
         number_on_the_page: '{0} ไม่มีการแท็ก|{1} มีหนึ่งแท็ก|]1,Inf[ มี %count% แท็ก'
         see_untagged_entries: 'พบรายการที่ไม่ได้แท็ก'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         add: 'เพิ่ม'
         placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma'
index 2f86f25d7342e56f24efcea1ec90774f82a54b65..49ebe79f1e4b970c9d0b7f05a2fc3248c4683f23 100644 (file)
@@ -417,6 +417,7 @@ tag:
     list:
         number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.'
         # see_untagged_entries: 'See untagged entries'
+        # no_untagged_entries: 'There are no untagged entries.'
     new:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
index cddd6e13d3e6827be7e456caf73493f99c5fbf97..aa17b8428e5b00f53207b6f76a8c2bf1ed6677b1 100644 (file)
     </ul>
 
     <div>
-        <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{untagged}})</a>
+        {% if nbEntriesUntagged == 0 %}
+            {{ 'tag.list.no_untagged_entries'|trans }}
+        {% else %}
+            <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
+        {% endif %}
     </div>
 {% endblock %}
index 552cafc948aad8be691fccfee716ca3a914f5ae4..0a3475ef080c932819df051a6bb8cd283e1ce8ae 100644 (file)
     </div>
 
     <div>
-        <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{untagged}})</a>
+        {% if nbEntriesUntagged == 0 %}
+            {{ 'tag.list.no_untagged_entries'|trans }}
+        {% else %}
+            <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
+        {% endif %}
     </div>
 {% endblock %}