mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
filter for entries with previewPicture
This commit is contained in:
parent
9c08a891f9
commit
a3bcd60a37
2 changed files with 15 additions and 2 deletions
|
@ -42,7 +42,14 @@ class EntryFilterType extends AbstractType
|
|||
},
|
||||
))
|
||||
->add('isArchived', 'filter_checkbox')
|
||||
->add('isStarred', 'filter_checkbox');
|
||||
->add('isStarred', 'filter_checkbox')
|
||||
->add('previewPicture', 'filter_checkbox', array(
|
||||
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
||||
$expression = $filterQuery->getExpr()->isNotNull($field);
|
||||
|
||||
return $filterQuery->createCondition($expression);
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
public function getName()
|
||||
|
|
|
@ -71,6 +71,12 @@
|
|||
<div class="col s12">
|
||||
<label>{% trans %}Status{% endtrans %}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6">
|
||||
{{ form_widget(form.previewPicture) }}
|
||||
<label for="entry_filter_previewPicture">{% trans %}Has a preview picture{% endtrans %}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6">
|
||||
{{ form_widget(form.isArchived) }}
|
||||
<label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label>
|
||||
|
|
Loading…
Reference in a new issue