-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace paginate widget with kitodo pagination
- Loading branch information
1 parent
054abf4
commit 907d639
Showing
7 changed files
with
313 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
Resources/Private/Plugins/SingleCollection/Partials/Pagination.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> | ||
<ul class="pagination"> | ||
<f:if condition="{pagination.previousPageNumberG} && {pagination.previousPageNumberG} >= {pagination.firstPageNumber}"> | ||
<f:then> | ||
<li class="first"> | ||
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': 1}" arguments="{searchParameter: lastSearch}" title="1">1</f:link.action> | ||
</li> | ||
<li class="previous"> | ||
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.previousPageNumber}" arguments="{searchParameter: lastSearch}" title="{f:translate(key: 'pagination.previous')}">{f:translate(key: 'prevPage')}</f:link.action> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<li class="first disabled"> | ||
<span>1</span> | ||
</li> | ||
<li class="previous disabled"> | ||
<span>{f:translate(key: 'prevPage')}</span> | ||
</li> | ||
</f:else> | ||
</f:if> | ||
<f:comment>add pages between first and last page, with dots if there are more than 5 pages (before or after) the respective page</f:comment> | ||
<f:for each="{pagination.pagesR}" as="page"> | ||
<f:switch expression="{page.label}"> | ||
<f:comment>If page 1 is not to be output twice, please remove the comment</f:comment> | ||
<f:comment> | ||
<f:case value="1"> | ||
<f:comment>don't add first page a second time</f:comment> | ||
</f:case> | ||
</f:comment> | ||
<f:comment>If last page is not to be output twice, please remove the comment</f:comment> | ||
<f:comment> | ||
<f:case value="{pagination.lastPageNumber}"> | ||
<f:comment>don't add last page a second time</f:comment> | ||
</f:case> | ||
</f:comment> | ||
<f:defaultCase> | ||
<f:switch expression="{page.label}"> | ||
<f:comment>add the dots</f:comment> | ||
<f:case value="..."> | ||
<li class="dots"> | ||
<span class="dots">...</span> | ||
</li> | ||
</f:case> | ||
<f:defaultCase> | ||
<li class="{f:if(condition: '{page.label} == {paginator.currentPageNumber}', then:'current')}"> | ||
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': page.startRecordNumber}" arguments="{searchParameter: lastSearch}">{page.label}</f:link.action> | ||
</li> | ||
</f:defaultCase> | ||
</f:switch> | ||
</f:defaultCase> | ||
</f:switch> | ||
</f:for> | ||
<f:if condition="{pagination.nextPageNumberG} && {pagination.nextPageNumberG} <= {pagination.lastPageNumber}"> | ||
<f:then> | ||
<li class="last"> | ||
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.lastPageNumberG}" arguments="{searchParameter: lastSearch}" title="{pagination.lastPageNumber}">{pagination.lastPageNumber}</f:link.action> | ||
</li> | ||
<li class="next"> | ||
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.nextPageNumber}" arguments="{searchParameter: lastSearch}" title="{f:translate(key: 'nextPage')}">{f:translate(key: 'nextPage')}</f:link.action> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<li class="last disabled"> | ||
<span>{pagination.lastPageNumber}</span> | ||
</li> | ||
<li class="next disabled"> | ||
<span>{f:translate(key: 'nextPage')}</span> | ||
</li> | ||
</f:else> | ||
</f:if> | ||
</ul> | ||
|
||
</html> |
Oops, something went wrong.