aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLuc Didry <luc@didry.org>2019-10-09 17:13:12 +0200
committerLuc Didry <luc@didry.org>2019-10-10 10:37:29 +0200
commitd8e961bdb58c799dde11e5f5de9405ce0e969d4a (patch)
tree41977ce7fa75357c99af04ca6238745bf271308e
parentafe486531d4dfffff7522efecdff1bcf18d13994 (diff)
downloadwallabag-d8e961bdb58c799dde11e5f5de9405ce0e969d4a.tar.gz
wallabag-d8e961bdb58c799dde11e5f5de9405ce0e969d4a.tar.zst
wallabag-d8e961bdb58c799dde11e5f5de9405ce0e969d4a.zip
💄 Add untagged list link to filter menu
Fix #3804
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig6
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig6
3 files changed, 16 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 5c8ecb40..85144a5c 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -567,6 +567,9 @@ class EntryController extends Controller
567 } 567 }
568 } 568 }
569 569
570 $nbEntriesUntagged = $this->get('wallabag_core.entry_repository')
571 ->countUntaggedEntriesByUser($this->getUser()->getId());
572
570 return $this->render( 573 return $this->render(
571 'WallabagCoreBundle:Entry:entries.html.twig', [ 574 'WallabagCoreBundle:Entry:entries.html.twig', [
572 'form' => $form->createView(), 575 'form' => $form->createView(),
@@ -574,6 +577,7 @@ class EntryController extends Controller
574 'currentPage' => $page, 577 'currentPage' => $page,
575 'searchTerm' => $searchTerm, 578 'searchTerm' => $searchTerm,
576 'isFiltered' => $form->isSubmitted(), 579 'isFiltered' => $form->isSubmitted(),
580 'nbEntriesUntagged' => $nbEntriesUntagged,
577 ] 581 ]
578 ); 582 );
579 } 583 }
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
index d8b39160..b747ed84 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
@@ -117,6 +117,12 @@
117 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a> 117 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
118 118
119 <div id="filter-status" class="filter-group"> 119 <div id="filter-status" class="filter-group">
120 {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %}
121 <div class="">
122 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
123 </div>
124 {% endif %}
125
120 <div class=""> 126 <div class="">
121 <label>{{ 'entry.filters.status_label'|trans }}</label> 127 <label>{{ 'entry.filters.status_label'|trans }}</label>
122 </div> 128 </div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 476d7403..3906e1e0 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -83,6 +83,12 @@
83 <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> 83 <h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
84 84
85 <div class="row"> 85 <div class="row">
86 {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %}
87 <div class="col s12 center-align">
88 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
89 </div>
90 {% endif %}
91
86 <div class="col s12"> 92 <div class="col s12">
87 <label>{{ 'entry.filters.status_label'|trans }}</label> 93 <label>{{ 'entry.filters.status_label'|trans }}</label>
88 </div> 94 </div>