Skip to content

Commit

Permalink
Fixed issues reported by QA part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Sep 13, 2023
1 parent 780e20f commit 786eec0
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{% trans_default_domain 'ibexa_search' %}

{% set content_type_terms = null %}
{% if aggregations is defined and aggregations.has('content_types') %}
{% set content_type_terms = aggregations.get('content_types') %}
{% endif %}

{% set sections_terms = null %}
{% if aggregations is defined and aggregations.has('sections') %}
{% set sections_terms = aggregations.get('sections') %}
{% endif %}

<div class="ibexa-filters ibexa-search-form__filters">
<div class="ibexa-filters__header">
<h3 class="ibexa-filters__title">{{ 'search.filters.title'|trans|desc('Filters') }}</h3>
Expand All @@ -23,7 +33,7 @@
</select>
{{ form_widget(form.content_types, {
'attr': {'class': 'ibexa-filters__select'},
'terms': aggregations.has('content_types') ? aggregations.get('content_types') : null
'terms': content_type_terms
}) }}
</div>
<div class="ibexa-filters__item ibexa-filters__item--modified">
Expand Down Expand Up @@ -69,7 +79,7 @@
<label class="ibexa-label">{{ 'search.section'|trans|desc('Section') }}</label>
{{ form_widget(form.section, {
'attr': {'class': 'ibexa-filters__select'},
'terms': aggregations.has('sections') ? aggregations.get('sections') : null
'terms': sections_terms
}) }}
</div>
{% endif %}
Expand Down

0 comments on commit 786eec0

Please sign in to comment.