aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2020-03-28 16:38:12 +0100
committerGitHub <noreply@github.com>2020-03-28 16:38:12 +0100
commit26467fa6b48d5ac2ea5fdab0e17eb1e585aee330 (patch)
treecdd84e67cc10eb3ea4e57bbb4efee52a1cafc00c /src
parentdcfce5468186fb18f6a23af46fcdc2513adf1cc0 (diff)
parent8ee7b1603d23297a6c183105f79b1290ce9828bf (diff)
downloadwallabag-26467fa6b48d5ac2ea5fdab0e17eb1e585aee330.tar.gz
wallabag-26467fa6b48d5ac2ea5fdab0e17eb1e585aee330.tar.zst
wallabag-26467fa6b48d5ac2ea5fdab0e17eb1e585aee330.zip
Merge pull request #4299 from wallabag/fix/4133
Fix createdAt filter on material
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php2
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php29
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig2
3 files changed, 16 insertions, 17 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 19045798..0e19a0c2 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -552,7 +552,7 @@ class Entry
552 * 552 *
553 * @return Entry 553 * @return Entry
554 */ 554 */
555 public function setCreatedAt(\DateTime $createdAt) 555 public function setCreatedAt(\DateTimeInterface $createdAt)
556 { 556 {
557 $this->createdAt = $createdAt; 557 $this->createdAt = $createdAt;
558 558
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
index 17070c59..61ad99a8 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
@@ -73,23 +73,22 @@ class EntryFilterType extends AbstractType
73 'label' => 'entry.filters.reading_time.label', 73 'label' => 'entry.filters.reading_time.label',
74 ]) 74 ])
75 ->add('createdAt', DateRangeFilterType::class, [ 75 ->add('createdAt', DateRangeFilterType::class, [
76 'left_date_options' => [ 76 'left_date_options' => [
77 'attr' => [ 77 'attr' => [
78 'placeholder' => 'dd/mm/yyyy', 78 'placeholder' => 'yyyy-mm-dd',
79 ],
80 'format' => 'dd/MM/yyyy',
81 'widget' => 'single_text',
82 ], 79 ],
83 'right_date_options' => [ 80 'format' => 'yyyy-MM-dd',
84 'attr' => [ 81 'widget' => 'single_text',
85 'placeholder' => 'dd/mm/yyyy', 82 ],
86 ], 83 'right_date_options' => [
87 'format' => 'dd/MM/yyyy', 84 'attr' => [
88 'widget' => 'single_text', 85 'placeholder' => 'yyyy-mm-dd',
89 ], 86 ],
90 'label' => 'entry.filters.created_at.label', 87 'format' => 'yyyy-MM-dd',
91 ] 88 'widget' => 'single_text',
92 ) 89 ],
90 'label' => 'entry.filters.created_at.label',
91 ])
93 ->add('domainName', TextFilterType::class, [ 92 ->add('domainName', TextFilterType::class, [
94 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { 93 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
95 $value = $values['value']; 94 $value = $values['value'];
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 0c21dc5d..0cd00cfd 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
@@ -39,7 +39,7 @@
39 39
40 <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}"> 40 <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}">
41 {% for entry in entries %} 41 {% for entry in entries %}
42 <li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12"> 42 <li id="entry-{{ entry.id|e }}" class="entry col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12">
43 {% if listMode == 1 %} 43 {% if listMode == 1 %}
44 {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} 44 {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %}
45 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} 45 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}