aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php3
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php15
-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
18 files changed, 42 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index d0155c60..90d36d71 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -87,6 +87,8 @@ 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 $nbEntriesUntagged = $this->get('wallabag_core.entry_repository')
91 ->countUntaggedEntriesByUser($this->getUser()->getId());
90 92
91 $renameForms = []; 93 $renameForms = [];
92 foreach ($tags as $tag) { 94 foreach ($tags as $tag) {
@@ -96,6 +98,7 @@ class TagController extends Controller
96 return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ 98 return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [
97 'tags' => $tags, 99 'tags' => $tags,
98 'renameForms' => $renameForms, 100 'renameForms' => $renameForms,
101 'nbEntriesUntagged' => $nbEntriesUntagged,
99 ]); 102 ]);
100 } 103 }
101 104
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 16c44885..d9675982 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -130,6 +130,21 @@ class EntryRepository extends EntityRepository
130 } 130 }
131 131
132 /** 132 /**
133 * Retrieve the number of untagged entries for a user.
134 *
135 * @param int $userId
136 *
137 * @return int
138 */
139 public function countUntaggedEntriesByUser($userId)
140 {
141 return (int) $this->getRawBuilderForUntaggedByUser($userId)
142 ->select('count(e.id)')
143 ->getQuery()
144 ->getSingleScalarResult();
145 }
146
147 /**
133 * Find Entries. 148 * Find Entries.
134 * 149 *
135 * @param int $userId 150 * @param int $userId
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index c6a91cd1..b6e067cc 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 423 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
424 # see_untagged_entries: 'See untagged entries' 424 # see_untagged_entries: 'See untagged entries'
425 # no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 # add: 'Add' 427 # add: 'Add'
427 # placeholder: 'You can add several tags, separated by a comma.' 428 # 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 4b785306..072cac0a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -413,6 +413,7 @@ tag:
413 list: 413 list:
414 number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' 414 number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.'
415 see_untagged_entries: 'Zeige nicht getaggte Einträge' 415 see_untagged_entries: 'Zeige nicht getaggte Einträge'
416 # no_untagged_entries: 'There are no untagged entries.'
416 new: 417 new:
417 add: 'Hinzufügen' 418 add: 'Hinzufügen'
418 placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.' 419 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 1f8c47aa..e1631d10 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 423 number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
424 see_untagged_entries: 'See untagged entries' 424 see_untagged_entries: 'See untagged entries'
425 no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 add: 'Add' 427 add: 'Add'
427 placeholder: 'You can add several tags, separated by a comma.' 428 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 06fa1e48..ebd4477a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' 423 number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.'
424 see_untagged_entries: 'Ver artículos sin etiquetas' 424 see_untagged_entries: 'Ver artículos sin etiquetas'
425 # no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 add: 'Añadir' 427 add: 'Añadir'
427 placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.' 428 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 5c1eaccc..e3857e24 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' 423 number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.'
424 # see_untagged_entries: 'See untagged entries' 424 # see_untagged_entries: 'See untagged entries'
425 # no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 # add: 'Add' 427 # add: 'Add'
427 # placeholder: 'You can add several tags, separated by a comma.' 428 # 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 09c1cc8f..97cb3272 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 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." 423 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."
424 see_untagged_entries: "Voir les articles sans tag" 424 see_untagged_entries: "Voir les articles sans tag"
425 no_untagged_entries: 'Aucun article sans tag.'
425 new: 426 new:
426 add: "Ajouter" 427 add: "Ajouter"
427 placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule." 428 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 92f2415b..7c0110a4 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -421,6 +421,7 @@ tag:
421 list: 421 list:
422 number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette." 422 number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette."
423 see_untagged_entries: 'Vedi articoli non etichettati' 423 see_untagged_entries: 'Vedi articoli non etichettati'
424 # no_untagged_entries: 'There are no untagged entries.'
424 new: 425 new:
425 add: 'Aggiungi' 426 add: 'Aggiungi'
426 placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.' 427 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 4439cbcd..e74d1a20 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -421,6 +421,7 @@ tag:
421 list: 421 list:
422 number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." 422 number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas."
423 see_untagged_entries: "Afichar las entradas sens etiquetas" 423 see_untagged_entries: "Afichar las entradas sens etiquetas"
424 # no_untagged_entries: 'There are no untagged entries.'
424 new: 425 new:
425 add: 'Ajustar' 426 add: 'Ajustar'
426 placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula." 427 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 8311770f..f4da2b18 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -421,6 +421,7 @@ tag:
421 list: 421 list:
422 number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' 422 number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.'
423 see_untagged_entries: 'Zobacz nieotagowane wpisy' 423 see_untagged_entries: 'Zobacz nieotagowane wpisy'
424 # no_untagged_entries: 'There are no untagged entries.'
424 new: 425 new:
425 add: 'Dodaj' 426 add: 'Dodaj'
426 placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.' 427 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 c83bf6c1..76d2bebe 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -421,6 +421,7 @@ tag:
421 list: 421 list:
422 number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' 422 number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.'
423 see_untagged_entries: 'Ver entradas sem tags' 423 see_untagged_entries: 'Ver entradas sem tags'
424 # no_untagged_entries: 'There are no untagged entries.'
424 new: 425 new:
425 # add: 'Add' 426 # add: 'Add'
426 # placeholder: 'You can add several tags, separated by a comma.' 427 # 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 c8bf8083..c10df5fe 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -421,6 +421,7 @@ tag:
421 list: 421 list:
422 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 422 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
423 # see_untagged_entries: 'See untagged entries' 423 # see_untagged_entries: 'See untagged entries'
424 # no_untagged_entries: 'There are no untagged entries.'
424 new: 425 new:
425 # add: 'Add' 426 # add: 'Add'
426 # placeholder: 'You can add several tags, separated by a comma.' 427 # 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 5d0e70c9..48695b3f 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
@@ -410,6 +410,7 @@ tag:
410 list: 410 list:
411 number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.' 411 number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.'
412 see_untagged_entries: 'Просмотреть записи без тегов' 412 see_untagged_entries: 'Просмотреть записи без тегов'
413 # no_untagged_entries: 'There are no untagged entries.'
413 new: 414 new:
414 add: 'Добавить' 415 add: 'Добавить'
415 placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.' 416 placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
index 66426d53..da5bbecd 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 number_on_the_page: '{0} ไม่มีการแท็ก|{1} มีหนึ่งแท็ก|]1,Inf[ มี %count% แท็ก' 420 number_on_the_page: '{0} ไม่มีการแท็ก|{1} มีหนึ่งแท็ก|]1,Inf[ มี %count% แท็ก'
421 see_untagged_entries: 'พบรายการที่ไม่ได้แท็ก' 421 see_untagged_entries: 'พบรายการที่ไม่ได้แท็ก'
422 # no_untagged_entries: 'There are no untagged entries.'
422 new: 423 new:
423 add: 'เพิ่ม' 424 add: 'เพิ่ม'
424 placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma' 425 placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 50bd38e3..8f42d381 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -419,6 +419,7 @@ tag:
419 list: 419 list:
420 number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' 420 number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.'
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/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
index ae8403bd..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 }}</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 79907bbb..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 }}</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 %}