Merge pull request #4150 from ldidry/fix-3804

💄 Add untagged list link to filter menu
This commit is contained in:
Jérémy Benoist 2019-11-19 14:23:49 +01:00 committed by GitHub
commit a9753ef990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View file

@ -535,6 +535,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(),
@ -542,6 +545,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>