💄 Add untagged list link to filter menu

Fix #3804
This commit is contained in:
Luc Didry 2019-10-09 17:13:12 +02:00
parent afe486531d
commit d8e961bdb5
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
3 changed files with 16 additions and 0 deletions

View file

@ -567,6 +567,9 @@ class EntryController extends Controller
}
}
$nbEntriesUntagged = $this->get('wallabag_core.entry_repository')
->countUntaggedEntriesByUser($this->getUser()->getId());
return $this->render(
'WallabagCoreBundle:Entry:entries.html.twig', [
'form' => $form->createView(),
@ -574,6 +577,7 @@ class EntryController extends Controller
'currentPage' => $page,
'searchTerm' => $searchTerm,
'isFiltered' => $form->isSubmitted(),
'nbEntriesUntagged' => $nbEntriesUntagged,
]
);
}

View file

@ -117,6 +117,12 @@
<a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
<div id="filter-status" class="filter-group">
{% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %}
<div class="">
<a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
</div>
{% endif %}
<div class="">
<label>{{ 'entry.filters.status_label'|trans }}</label>
</div>

View file

@ -83,6 +83,12 @@
<h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
<div class="row">
{% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %}
<div class="col s12 center-align">
<a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
</div>
{% endif %}
<div class="col s12">
<label>{{ 'entry.filters.status_label'|trans }}</label>
</div>