aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Filter/EntryFilterType.php11
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig6
2 files changed, 15 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
index 85d1a061..c0b89196 100644
--- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
@@ -39,10 +39,17 @@ class EntryFilterType extends AbstractType
39 $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); 39 $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%'));
40 40
41 return $filterQuery->createCondition($expression); 41 return $filterQuery->createCondition($expression);
42 }, 42 },
43 )) 43 ))
44 ->add('isArchived', 'filter_checkbox') 44 ->add('isArchived', 'filter_checkbox')
45 ->add('isStarred', 'filter_checkbox'); 45 ->add('isStarred', 'filter_checkbox')
46 ->add('previewPicture', 'filter_checkbox', array(
47 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
48 $expression = $filterQuery->getExpr()->isNotNull($field);
49
50 return $filterQuery->createCondition($expression);
51 },
52 ));
46 } 53 }
47 54
48 public function getName() 55 public function getName()
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 3711f6e5..9a2442a0 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
@@ -71,6 +71,12 @@
71 <div class="col s12"> 71 <div class="col s12">
72 <label>{% trans %}Status{% endtrans %}</label> 72 <label>{% trans %}Status{% endtrans %}</label>
73 </div> 73 </div>
74
75 <div class="input-field col s6">
76 {{ form_widget(form.previewPicture) }}
77 <label for="entry_filter_previewPicture">{% trans %}Has a preview picture{% endtrans %}</label>
78 </div>
79
74 <div class="input-field col s6"> 80 <div class="input-field col s6">
75 {{ form_widget(form.isArchived) }} 81 {{ form_widget(form.isArchived) }}
76 <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label> 82 <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label>