1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Merge pull request #4299 from wallabag/fix/4133

Fix createdAt filter on material
This commit is contained in:
Jérémy Benoist 2020-03-28 16:38:12 +01:00 committed by GitHub
commit 26467fa6b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 71 additions and 73 deletions

View file

@ -552,7 +552,7 @@ class Entry
*
* @return Entry
*/
public function setCreatedAt(\DateTime $createdAt)
public function setCreatedAt(\DateTimeInterface $createdAt)
{
$this->createdAt = $createdAt;

View file

@ -73,23 +73,22 @@ class EntryFilterType extends AbstractType
'label' => 'entry.filters.reading_time.label',
])
->add('createdAt', DateRangeFilterType::class, [
'left_date_options' => [
'attr' => [
'placeholder' => 'dd/mm/yyyy',
],
'format' => 'dd/MM/yyyy',
'widget' => 'single_text',
'left_date_options' => [
'attr' => [
'placeholder' => 'yyyy-mm-dd',
],
'right_date_options' => [
'attr' => [
'placeholder' => 'dd/mm/yyyy',
],
'format' => 'dd/MM/yyyy',
'widget' => 'single_text',
'format' => 'yyyy-MM-dd',
'widget' => 'single_text',
],
'right_date_options' => [
'attr' => [
'placeholder' => 'yyyy-mm-dd',
],
'label' => 'entry.filters.created_at.label',
]
)
'format' => 'yyyy-MM-dd',
'widget' => 'single_text',
],
'label' => 'entry.filters.created_at.label',
])
->add('domainName', TextFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
$value = $values['value'];

View file

@ -39,7 +39,7 @@
<ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}">
{% for entry in entries %}
<li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12">
<li id="entry-{{ entry.id|e }}" class="entry col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12">
{% if listMode == 1 %}
{% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %}
{% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}