aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-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 884a67ba..5c4ca29c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -423,6 +423,7 @@ tag:
423 list: 423 list:
424 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 424 # number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
425 # see_untagged_entries: 'See untagged entries' 425 # see_untagged_entries: 'See untagged entries'
426 # no_untagged_entries: 'There are no untagged entries.'
426 new: 427 new:
427 # add: 'Add' 428 # add: 'Add'
428 # placeholder: 'You can add several tags, separated by a comma.' 429 # 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 97a6a387..a21bd0f1 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -414,6 +414,7 @@ tag:
414 list: 414 list:
415 number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.' 415 number_on_the_page: '{0} Es gibt keine Tags.|{1} Es gibt einen Tag.|]1,Inf[ Es gibt %count% Tags.'
416 see_untagged_entries: 'Zeige nicht getaggte Einträge' 416 see_untagged_entries: 'Zeige nicht getaggte Einträge'
417 # no_untagged_entries: 'There are no untagged entries.'
417 new: 418 new:
418 add: 'Hinzufügen' 419 add: 'Hinzufügen'
419 placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.' 420 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 2bd4828a..2f310246 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -423,6 +423,7 @@ tag:
423 list: 423 list:
424 number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' 424 number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
425 see_untagged_entries: 'See untagged entries' 425 see_untagged_entries: 'See untagged entries'
426 no_untagged_entries: 'There are no untagged entries.'
426 new: 427 new:
427 add: 'Add' 428 add: 'Add'
428 placeholder: 'You can add several tags, separated by a comma.' 429 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 24dc5929..c194041a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -423,6 +423,7 @@ tag:
423 list: 423 list:
424 number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.' 424 number_on_the_page: '{0} No hay ninguna etiqueta.|{1} Hay una etiqueta.|]1,Inf[ Hay %count% etiquetas.'
425 see_untagged_entries: 'Ver artículos sin etiquetas' 425 see_untagged_entries: 'Ver artículos sin etiquetas'
426 # no_untagged_entries: 'There are no untagged entries.'
426 new: 427 new:
427 add: 'Añadir' 428 add: 'Añadir'
428 placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.' 429 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 f041ef9e..9aef7dde 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -423,6 +423,7 @@ tag:
423 list: 423 list:
424 number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.' 424 number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.'
425 # see_untagged_entries: 'See untagged entries' 425 # see_untagged_entries: 'See untagged entries'
426 # no_untagged_entries: 'There are no untagged entries.'
426 new: 427 new:
427 # add: 'Add' 428 # add: 'Add'
428 # placeholder: 'You can add several tags, separated by a comma.' 429 # 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 5d2c5e36..9848ed9a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -423,6 +423,7 @@ tag:
423 list: 423 list:
424 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 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."
425 see_untagged_entries: "Voir les articles sans tag" 425 see_untagged_entries: "Voir les articles sans tag"
426 no_untagged_entries: 'Aucun article sans tag.'
426 new: 427 new:
427 add: "Ajouter" 428 add: "Ajouter"
428 placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule." 429 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 dd650bf4..efbf062b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette." 423 number_on_the_page: "{0} Non ci sono etichette.|{1} C'è un'etichetta.|]1,Inf[ ci sono %count% etichette."
424 see_untagged_entries: 'Vedi articoli non etichettati' 424 see_untagged_entries: 'Vedi articoli non etichettati'
425 # no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 add: 'Aggiungi' 427 add: 'Aggiungi'
427 placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.' 428 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 0097377d..86ce4644 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas." 423 number_on_the_page: "{0} I a pas cap d'etiquetas.|{1} I a una etiqueta.|]1,Inf[ I a %count% etiquetas."
424 see_untagged_entries: "Afichar las entradas sens etiquetas" 424 see_untagged_entries: "Afichar las entradas sens etiquetas"
425 # no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 add: 'Ajustar' 427 add: 'Ajustar'
427 placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula." 428 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 9ff4f459..9ebe0236 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.' 423 number_on_the_page: '{0} Nie ma tagów.|{1} Jest jeden tag.|]1,Inf[ Są %count% tagi.'
424 see_untagged_entries: 'Zobacz nieotagowane wpisy' 424 see_untagged_entries: 'Zobacz nieotagowane wpisy'
425 # no_untagged_entries: 'There are no untagged entries.'
425 new: 426 new:
426 add: 'Dodaj' 427 add: 'Dodaj'
427 placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.' 428 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 b90e5a54..d310e016 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -422,6 +422,7 @@ tag:
422 list: 422 list:
423 number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.' 423 number_on_the_page: '{0} Não existem tags.|{1} Uma tag.|]1,Inf[ Existem %count% tags.'
424 see_untagged_entries: 'Ver entradas sem tags' 424 see_untagged_entries: 'Ver entradas sem tags'
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.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 514df6dc..c11ff0b8 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.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.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
index 34d5cce8..9fe75369 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
@@ -411,6 +411,7 @@ tag:
411 list: 411 list:
412 number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.' 412 number_on_the_page: '{0} Теги не найдены.|{1} Найден один тег.|]1,Inf[ Найдено %count% тегов.'
413 see_untagged_entries: 'Просмотреть записи без тегов' 413 see_untagged_entries: 'Просмотреть записи без тегов'
414 # no_untagged_entries: 'There are no untagged entries.'
414 new: 415 new:
415 add: 'Добавить' 416 add: 'Добавить'
416 placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.' 417 placeholder: 'Вы можете добавить несколько тегов, разделенных запятой.'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
index aad2e51b..672dcbf0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.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: 'พบรายการที่ไม่ได้แท็ก' 422 see_untagged_entries: 'พบรายการที่ไม่ได้แท็ก'
423 # no_untagged_entries: 'There are no untagged entries.'
423 new: 424 new:
424 add: 'เพิ่ม' 425 add: 'เพิ่ม'
425 placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma' 426 placeholder: 'คุณสามารถเพิ่มได้หลายแท็ก, จากการแบ่งโดย comma'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index c23461f6..c2ad854d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -420,6 +420,7 @@ tag:
420 list: 420 list:
421 number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.' 421 number_on_the_page: '{0} Herhangi bir etiket yok.|{1} Burada bir adet etiket var.|]1,Inf[ Burada %count% adet etiket var.'
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/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 %}