diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-11-19 14:23:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 14:23:49 +0100 |
commit | a9753ef99018a0b92e6af1f9a6e98fa3c7e92792 (patch) | |
tree | 58292f40aed9627a1fad7b08d3438d98c802b3de | |
parent | 31579b75fccceb7bf81907db38072963fa425c36 (diff) | |
parent | d8e961bdb58c799dde11e5f5de9405ce0e969d4a (diff) | |
download | wallabag-a9753ef99018a0b92e6af1f9a6e98fa3c7e92792.tar.gz wallabag-a9753ef99018a0b92e6af1f9a6e98fa3c7e92792.tar.zst wallabag-a9753ef99018a0b92e6af1f9a6e98fa3c7e92792.zip |
Merge pull request #4150 from ldidry/fix-3804
💄 Add untagged list link to filter menu
3 files changed, 16 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index cd9e8d27..ba5bfbe2 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -535,6 +535,9 @@ class EntryController extends Controller | |||
535 | } | 535 | } |
536 | } | 536 | } |
537 | 537 | ||
538 | $nbEntriesUntagged = $this->get('wallabag_core.entry_repository') | ||
539 | ->countUntaggedEntriesByUser($this->getUser()->getId()); | ||
540 | |||
538 | return $this->render( | 541 | return $this->render( |
539 | 'WallabagCoreBundle:Entry:entries.html.twig', [ | 542 | 'WallabagCoreBundle:Entry:entries.html.twig', [ |
540 | 'form' => $form->createView(), | 543 | 'form' => $form->createView(), |
@@ -542,6 +545,7 @@ class EntryController extends Controller | |||
542 | 'currentPage' => $page, | 545 | 'currentPage' => $page, |
543 | 'searchTerm' => $searchTerm, | 546 | 'searchTerm' => $searchTerm, |
544 | 'isFiltered' => $form->isSubmitted(), | 547 | 'isFiltered' => $form->isSubmitted(), |
548 | 'nbEntriesUntagged' => $nbEntriesUntagged, | ||
545 | ] | 549 | ] |
546 | ); | 550 | ); |
547 | } | 551 | } |
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">×</a> | 117 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</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> |