Index.html 2.64 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
61
62
63
64
65
66
<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/"
	  data-namespace-typo3-fluid="true">
<f:if condition="{configuration.insertAbove}">
	<f:render section="paginator" arguments="{pagination: contentArguments.pagination, configuration:configuration, resultSet:resultSet}" />
</f:if>

<f:renderChildren arguments="{contentArguments}" />

<f:if condition="{configuration.insertBelow}">
	<f:render section="paginator" arguments="{pagination: contentArguments.pagination, configuration:configuration, resultSet:resultSet}"  />
</f:if>

<f:section name="paginator">
	<f:if condition="{pagination.numberOfPages} > 1">
		<nav aria-label="Pagination" class="tx-solr-pagination-page-browser">
			<ul class="pagination justify-content-center">
				<f:if condition="{pagination.previousPage}">
					<li class="page-item previous">
						<f:if condition="{pagination.previousPage} > 1">
							<f:then>
								<a href="{s:uri.paginate.resultPage(page: pagination.previousPage)}" class="page-link solr-ajaxified"><s:translate key="paginate_previous">&laquo;</s:translate></a>
							</f:then>
							<f:else>
								<a href="{s:uri.paginate.resultPage()}" class="page-link solr-ajaxified"><s:translate key="paginate_previous">&laquo;</s:translate></a>
							</f:else>
						</f:if>
					</li>
				</f:if>
				<f:if condition="{pagination.hasLessPages}">
					<li class="page-item"><a class="page-link">....</a></li>
				</f:if>
				<f:for each="{pagination.pages}" as="page">
					<f:if condition="{page.isCurrent}">
						<f:then>
							<li class="page-item active">
								<a href="{s:uri.paginate.resultPage()}" class="page-link solr-ajaxified">{page.number}</a>
							</li>
						</f:then>
						<f:else>
							<li class="page-item">
								<f:if condition="{page.number} > 1">
									<f:then>
										<a href="{s:uri.paginate.resultPage(page: page.number)}" class="page-link solr-ajaxified">{page.number}</a>
									</f:then>
									<f:else>
										<a href="{s:uri.paginate.resultPage()}" class="page-link solr-ajaxified">{page.number}</a>
									</f:else>
								</f:if>
							</li>
						</f:else>
					</f:if>
				</f:for>
				<f:if condition="{pagination.hasMorePages}">
					<li class="page-item"><a class="page-link">....</a></li>
				</f:if>
				<f:if condition="{pagination.nextPage}">
					<li class="page-item last next">
						<a href="{s:uri.paginate.resultPage(page: pagination.nextPage)}" class="page-link solr-ajaxified"><s:translate key="paginate_next">&raquo;</s:translate></a>
					</li>
				</f:if>
			</ul>
		</nav>
	</f:if>
</f:section>