aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-06-06 13:34:20 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-06-06 13:34:20 +0200
commit35c7819cb63a9c481a2b612755d881d24d6586d0 (patch)
tree8edc207df2b1fd17a19d96e07c02a864733039d5 /src/Wallabag
parent0f2d24feb4709bf0ea97e6152e8a607aaa3c1c72 (diff)
downloadwallabag-35c7819cb63a9c481a2b612755d881d24d6586d0.tar.gz
wallabag-35c7819cb63a9c481a2b612755d881d24d6586d0.tar.zst
wallabag-35c7819cb63a9c481a2b612755d881d24d6586d0.zip
Remove link when there are no untagged articles
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.th.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig6
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig6
17 files changed, 26 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index 91f34b3d..90d36d71 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -87,7 +87,7 @@ class TagController extends Controller
87 { 87 {
88 $tags = $this->get('wallabag_core.tag_repository') 88 $tags = $this->get('wallabag_core.tag_repository')
89 ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); 89 ->findAllFlatTagsWithNbEntries($this->getUser()->getId());
90 $untagged = $this->get('wallabag_core.entry_repository') 90 $nbEntriesUntagged = $this->get('wallabag_core.entry_repository')
91 ->countUntaggedEntriesByUser($this->getUser()->getId()); 91 ->countUntaggedEntriesByUser($this->getUser()->getId());
92 92
93 $renameForms = []; 93 $renameForms = [];
@@ -98,7 +98,7 @@ class TagController extends Controller
98 return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ 98 return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [
99 'tags' => $tags, 99 'tags' => $tags,
100 'renameForms' => $renameForms, 100 'renameForms' => $renameForms,
101 'untagged' => $untagged, 101 'nbEntriesUntagged' => $nbEntriesUntagged,
102 ]); 102 ]);
103 } 103 }
104 104
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index e04c2ff1..a01c7688 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -420,6 +420,7 @@ tag:
420 list: 420 list:
421 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 421 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
422 # see_untagged_entries: 'See untagged entries' 422 # see_untagged_entries: 'See untagged entries'
423 # no_untagged_entries: 'There are no untagged entries.'
423 new: 424 new:
424 # add: 'Add' 425 # add: 'Add'
425 # placeholder: 'You can add several tags, separated by a comma.' 426 # placeholder: 'You can add several tags, separated by a comma.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index 5a9668a9..a1b41855 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -411,6 +411,7 @@ tag:
411 list: 411 list:
412 number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' 412 number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.'
413 see_untagged_entries: 'Zeige nicht getaggte Einträge' 413 see_untagged_entries: 'Zeige nicht getaggte Einträge'
414 # no_untagged_entries: 'There are no untagged entries.'
414 new: 415 new:
415 add: 'Hinzufügen' 416 add: 'Hinzufügen'
416 placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.' 417 placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index e2994f53..020cd08a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -420,6 +420,7 @@ tag:
420 list: 420 list:
421 number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 421 number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
422 see_untagged_entries: 'See untagged entries' 422 see_untagged_entries: 'See untagged entries'
423 no_untagged_entries: 'There are no untagged entries.'
423 new: 424 new:
424 add: 'Add' 425 add: 'Add'
425 placeholder: 'You can add several tags, separated by a comma.' 426 placeholder: 'You can add several tags, separated by a comma.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index d1ccfc81..130c12f3 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -420,6 +420,7 @@ tag:
420 list: 420 list:
421 number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' 421 number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.'
422 see_untagged_entries: 'Ver artículos sin etiquetas' 422 see_untagged_entries: 'Ver artículos sin etiquetas'
423 # no_untagged_entries: 'There are no untagged entries.'
423 new: 424 new:
424 add: 'Añadir' 425 add: 'Añadir'
425 placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.' 426 placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index e5d36bd3..31db51fa 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -420,6 +420,7 @@ tag:
420 list: 420 list:
421 number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' 421 number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.'
422 # see_untagged_entries: 'See untagged entries' 422 # see_untagged_entries: 'See untagged entries'
423 # no_untagged_entries: 'There are no untagged entries.'
423 new: 424 new:
424 # add: 'Add' 425 # add: 'Add'
425 # placeholder: 'You can add several tags, separated by a comma.' 426 # placeholder: 'You can add several tags, separated by a comma.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 0b1853a4..df3692dc 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -420,6 +420,7 @@ tag:
420 list: 420 list:
421 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." 421 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."
422 see_untagged_entries: "Voir les articles sans tag" 422 see_untagged_entries: "Voir les articles sans tag"
423 no_untagged_entries: 'Aucun article sans tag.'
423 new: 424 new:
424 add: "Ajouter" 425 add: "Ajouter"
425 placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule." 426 placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule."
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 0474d2bc..337a1bfa 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette." 420 number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette."
421 see_untagged_entries: 'Vedi articoli non etichettati' 421 see_untagged_entries: 'Vedi articoli non etichettati'
422 # no_untagged_entries: 'There are no untagged entries.'
422 new: 423 new:
423 add: 'Aggiungi' 424 add: 'Aggiungi'
424 placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.' 425 placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index e761832e..fc0a03b5 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." 420 number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas."
421 see_untagged_entries: "Afichar las entradas sens etiquetas" 421 see_untagged_entries: "Afichar las entradas sens etiquetas"
422 # no_untagged_entries: 'There are no untagged entries.'
422 new: 423 new:
423 add: 'Ajustar' 424 add: 'Ajustar'
424 placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula." 425 placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula."
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index f3d506e5..f9609ea2 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' 420 number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.'
421 see_untagged_entries: 'Zobacz nieotagowane wpisy' 421 see_untagged_entries: 'Zobacz nieotagowane wpisy'
422 # no_untagged_entries: 'There are no untagged entries.'
422 new: 423 new:
423 add: 'Dodaj' 424 add: 'Dodaj'
424 placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.' 425 placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
index 6ddc1fc1..e9d3a6cf 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' 420 number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.'
421 see_untagged_entries: 'Ver entradas sem tags' 421 see_untagged_entries: 'Ver entradas sem tags'
422 # no_untagged_entries: 'There are no untagged entries.'
422 new: 423 new:
423 # add: 'Add' 424 # add: 'Add'
424 # placeholder: 'You can add several tags, separated by a comma.' 425 # placeholder: 'You can add several tags, separated by a comma.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 8c0791f0..dde0c9a1 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 420 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
421 # see_untagged_entries: 'See untagged entries' 421 # see_untagged_entries: 'See untagged entries'
422 # no_untagged_entries: 'There are no untagged entries.'
422 new: 423 new:
423 # add: 'Add' 424 # add: 'Add'
424 # placeholder: 'You can add several tags, separated by a comma.' 425 # placeholder: 'You can add several tags, separated by a comma.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
index 2ee2d83a..8dcba74b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
@@ -407,6 +407,7 @@ tag:
407 list: 407 list:
408 number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.' 408 number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.'
409 see_untagged_entries: 'Просмотреть записи без тегов' 409 see_untagged_entries: 'Просмотреть записи без тегов'
410 # no_untagged_entries: 'There are no untagged entries.'
410 new: 411 new:
411 add: 'Добавить' 412 add: 'Добавить'
412 placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.' 413 placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
index 967ae427..8dc65dd6 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
@@ -417,6 +417,7 @@ tag:
417 list: 417 list:
418 number_on_the_page: '{0} ไม่มีการแท็ก|{1} มีหนึ่งแท็ก|]1,Inf[ มี %count% แท็ก' 418 number_on_the_page: '{0} ไม่มีการแท็ก|{1} มีหนึ่งแท็ก|]1,Inf[ มี %count% แท็ก'
419 see_untagged_entries: 'พบรายการที่ไม่ได้แท็ก' 419 see_untagged_entries: 'พบรายการที่ไม่ได้แท็ก'
420 # no_untagged_entries: 'There are no untagged entries.'
420 new: 421 new:
421 add: 'เพิ่ม' 422 add: 'เพิ่ม'
422 placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma' 423 placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 2f86f25d..49ebe79f 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -417,6 +417,7 @@ tag:
417 list: 417 list:
418 number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' 418 number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.'
419 # see_untagged_entries: 'See untagged entries' 419 # see_untagged_entries: 'See untagged entries'
420 # no_untagged_entries: 'There are no untagged entries.'
420 new: 421 new:
421 # add: 'Add' 422 # add: 'Add'
422 # placeholder: 'You can add several tags, separated by a comma.' 423 # placeholder: 'You can add several tags, separated by a comma.'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
index cddd6e13..aa17b842 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
@@ -31,6 +31,10 @@
31 </ul> 31 </ul>
32 32
33 <div> 33 <div>
34 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{untagged}})</a> 34 {% if nbEntriesUntagged == 0 %}
35 {{ 'tag.list.no_untagged_entries'|trans }}
36 {% else %}
37 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
38 {% endif %}
35 </div> 39 </div>
36{% endblock %} 40{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
index 552cafc9..0a3475ef 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
@@ -34,6 +34,10 @@
34 </div> 34 </div>
35 35
36 <div> 36 <div>
37 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{untagged}})</a> 37 {% if nbEntriesUntagged == 0 %}
38 {{ 'tag.list.no_untagged_entries'|trans }}
39 {% else %}
40 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
41 {% endif %}
38 </div> 42 </div>
39{% endblock %} 43{% endblock %}