Skip to content

Commit

Permalink
fix: date filters in search
Browse files Browse the repository at this point in the history
HEL-352 | fix: date filters in search
  • Loading branch information
melniiv committed Jun 14, 2024
2 parents 8eb0d26 + 704753c commit 561ec41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hkm/templates/hkm/views/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1 class="banner__h1">{% trans 'Search pictures' %}</h1>
<div class="date-range">
<select class="search-input" name="date_from" id="date_from">
<option value="" {% if not date_from %}selected{% endif %}>{% trans 'From year' %}</option>
{% for date in all_dates|dictsort:"translated" %}
{% for date in facet_result.facets.main_date_str|dictsort:"translated" %}
<option value="{{ date.value }}" {% if date.value == date_from %}selected{% endif %}>
{{ date.translated }}
</option>
Expand All @@ -37,7 +37,7 @@ <h1 class="banner__h1">{% trans 'Search pictures' %}</h1>

<select class="search-input" name="date_to" id="date_to">
<option value="" {% if not date_to %}selected{% endif %}>{% trans 'To year' %}</option>
{% for date in all_dates|dictsort:"translated" %}
{% for date in facet_result.facets.main_date_str|dictsort:"translated" %}
<option value="{{ date.value }}" {% if date.value == date_to %}selected{% endif %}>
{{ date.translated }}
</option>
Expand Down

0 comments on commit 561ec41

Please sign in to comment.