Unverified Commit 9504033c authored by Felix Ranesberger's avatar Felix Ranesberger
Browse files

[TASK] Show "No search results found." message if solr finds no search results

parent abaa49bd
Pipeline #25720 passed with stages
in 3 minutes and 20 seconds
......@@ -64,55 +64,67 @@
</f:if>
<f:if condition="{resultSet.hasSearched}">
<div class="container search-filter mb-4">
<div class="row">
<div class="col-12">
<f:variable name="facetUsed" value="0"/>
<f:for each="{resultSet.facets}" as="facet">
<f:if condition="{facet.isUsed}">
<f:variable name="facetUsed" value="1"/>
</f:if>
</f:for>
<ul class="nav nav-tabs nav-fill">
<li class="nav-item">
<a href="{s:uri.facet.removeAllFacets()}" class="nav-link{f:if(condition:'{facetUsed}', else:' active')}">
All
<span class="badge badge-dark">{allResultCountWithoutFacets}</span>
</a>
</li>
<f:if condition="{resultSet.hasSearched}">
<f:if condition="{resultSet.usedSearchRequest.contextTypoScriptConfiguration.searchFaceting}">
<f:render partial="Result/Facets" section="Facets" arguments="{resultSet:resultSet}"/>
</f:if>
</f:if>
</ul>
</div>
</div>
<ol start="{pagination.displayRangeStart}" class="results-list">
<f:for each="{resultSet.searchResults}" as="document">
<f:render
partial="Result/Document"
section="Document"
arguments="{
<div class="container search-filter my-4">
<f:if condition="{resultSet.searchResults}">
<f:then>
<div class="row">
<div class="col-12">
<f:variable name="facetUsed" value="0" />
<f:for each="{resultSet.facets}" as="facet">
<f:if condition="{facet.isUsed}">
<f:variable name="facetUsed" value="1"/>
</f:if>
</f:for>
<ul class="nav nav-tabs nav-fill">
<li class="nav-item">
<a href="{s:uri.facet.removeAllFacets()}" class="nav-link{f:if(condition:'{facetUsed}', else:' active')}">
All
<span class="badge badge-dark">{allResultCountWithoutFacets}</span>
</a>
</li>
<f:if condition="{resultSet.hasSearched}">
<f:if condition="{resultSet.usedSearchRequest.contextTypoScriptConfiguration.searchFaceting}">
<f:render
partial="Result/Facets"
section="Facets"
arguments="{resultSet:resultSet}"
/>
</f:if>
</f:if>
</ul>
</div>
</div>
<ol start="{pagination.displayRangeStart}" class="results-list">
<f:for each="{resultSet.searchResults}" as="document">
<f:render
partial="Result/Document"
section="Document"
arguments="{
resultSet: resultSet,
document: document
}"
/>
</f:for>
/>
</f:for>
<f:render
partial="Result/Pagination"
section="Pagination"
arguments="{
<f:render
partial="Result/Pagination"
section="Pagination"
arguments="{
resultSet: resultSet,
pagination: pagination,
currentPage: currentPage
}"
/>
</ol>
/>
</ol>
</f:then>
<f:else>
<h2>No search results found.</h2>
</f:else>
</f:if>
</div>
</f:if>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment