Results.html 2.28 KB
Newer Older
Thomas Löffler's avatar
Thomas Löffler committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
	xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
	xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers/">

<f:layout name="Main" />

<f:section name="main">

	<div id="tx-solr-search">

		<f:if condition="{resultSet.isAutoCorrected}">
			<f:then>
				<span class="searched-for">
					<s:translate key="no_results_nothing_found" arguments="{0: resultSet.initialQueryString}">Nothing found for "%s".</s:translate>
					<s:translate key="no_results_search_for_original" arguments="{0: resultSet.correctedQueryString}">Search instead for "%s".</s:translate>
				</span>
			</f:then>

			<f:else>
				<f:if condition="{resultSet.usedQuery.keywordsCleaned}">
					<span class="searched-for">
						<s:translate key="results_searched_for" arguments="{0: resultSet.usedQuery.keywordsCleaned}">Searched for "%s"</s:translate>
					</span>
				</f:if>
			</f:else>
		</f:if>

		<f:if condition="{resultSet.hasSpellCheckingSuggestions}">
			<f:then>
				<s:translate key="didYouMean">Did you mean</s:translate>
				<f:for each="{resultSet.spellCheckingSuggestions}" as="suggestion">
					<f:link.page additionalParams="{q:suggestion.suggestion}" noCacheHash="1">{suggestion.suggestion}</f:link.page>
				</f:for>
				?
			</f:then>
		</f:if>

		<f:if condition="{resultSet.usedSearch.numberOfResults}">
			<span class="result-found">
				<s:translate key="results_found" arguments="{0:resultSet.usedSearch.numberOfResults, 1: resultSet.usedSearch.queryTime}">Found %d extensions in %d seconds</s:translate>
			</span>
		</f:if>

		<f:if condition="{hasSearched}">
			<s:widget.resultPaginate resultSet="{resultSet}" configuration="{templatePath:'EXT:ter_layout/Resources/Private/Templates/Solr/ViewHelpers/Widget/ResultPaginate/Index.html'}">
				<ol start="{pagination.displayRangeStart}" class="results-list list-unstyled">
					<f:for each="{documents}" as="document" iteration="iterator">
						<f:if condition="{iterator.isOdd}">
							<div class="card-deck">
						</f:if>
						<f:render partial="Result/Document" section="Document" arguments="{resultSet:resultSet, document:document}" />
						<f:if condition="{iterator.isEven} || {iterator.isLast}">
							</div>
						</f:if>
					</f:for>
				</ol>
			</s:widget.resultPaginate>
		</f:if>
	</div>
</f:section>