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:
commit
26467fa6b4
7 changed files with 71 additions and 73 deletions
|
@ -552,7 +552,7 @@ class Entry
|
|||
*
|
||||
* @return Entry
|
||||
*/
|
||||
public function setCreatedAt(\DateTime $createdAt)
|
||||
public function setCreatedAt(\DateTimeInterface $createdAt)
|
||||
{
|
||||
$this->createdAt = $createdAt;
|
||||
|
||||
|
|
|
@ -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'];
|
||||
|
|
|
@ -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/' %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue