-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Streamline pagination html template
- Loading branch information
1 parent
85bc399
commit 61c3203
Showing
1 changed file
with
62 additions
and
61 deletions.
There are no files selected for viewing
123 changes: 62 additions & 61 deletions
123
Resources/Private/Templates/ViewHelpers/Widget/Paginate/Index.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 |
---|---|---|
@@ -1,68 +1,69 @@ | ||
<f:if condition="{configuration.insertAbove}"> | ||
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" /> | ||
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" /> | ||
</f:if> | ||
|
||
<f:renderChildren arguments="{contentArguments}" /> | ||
|
||
<f:if condition="{configuration.insertBelow}"> | ||
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" /> | ||
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" /> | ||
</f:if> | ||
|
||
<f:section name="paginator"> | ||
<ul class="pagination"> | ||
<f:if condition="{pagination.previousPage}"> | ||
<li class="previous"> | ||
<f:if condition="{pagination.previousPage} > 1"> | ||
<f:then> | ||
<f:widget.link arguments="{currentPage: pagination.previousPage}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}"><f:translate key="widget.pagination.previous" /></f:widget.link> | ||
</f:then> | ||
<f:else> | ||
<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}"><f:translate key="widget.pagination.previous" /></f:widget.link> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.displayRangeStart} > 1"> | ||
<li class="first"> | ||
<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">1</f:widget.link> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.hasLessPages}"> | ||
<li><a href="javascript:void();" style="cursor: default;">...</a></li> | ||
</f:if> | ||
<f:for each="{pagination.pages}" as="page"> | ||
<f:if condition="{page.isCurrent}"> | ||
<f:then> | ||
<li class="active"> | ||
<a href="#">{page.number}</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<li> | ||
<f:if condition="{page.number} > 1"> | ||
<f:then> | ||
<f:widget.link arguments="{currentPage: page.number}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">{page.number}</f:widget.link> | ||
</f:then> | ||
<f:else> | ||
<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">{page.number}</f:widget.link> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:else> | ||
</f:if> | ||
</f:for> | ||
<f:if condition="{pagination.hasMorePages}"> | ||
<li><a href="javascript:void();" style="cursor: default;">...</a></li> | ||
</f:if> | ||
<f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}"> | ||
<li class="last"> | ||
<f:widget.link arguments="{currentPage: pagination.numberOfPages}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">{pagination.numberOfPages}</f:widget.link> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.nextPage}"> | ||
<li class="next"> | ||
<f:widget.link arguments="{currentPage: pagination.nextPage}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}"><f:translate key="widget.pagination.next" /></f:widget.link> | ||
</li> | ||
</f:if> | ||
</ul> | ||
<ul class="pagination"> | ||
<f:if condition="{pagination.previousPage}"> | ||
<li class="previous"> | ||
<f:if condition="{pagination.previousPage} > 1"> | ||
<f:then> | ||
<f:widget.link arguments="{currentPage: pagination.previousPage}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}"><f:translate key="widget.pagination.previous" /></f:widget.link> | ||
</f:then> | ||
<f:else> | ||
<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}"><f:translate key="widget.pagination.previous" /></f:widget.link> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.displayRangeStart} > 1"> | ||
<li class="first"> | ||
<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">1</f:widget.link> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.hasLessPages}"> | ||
<li> | ||
<a href="javascript:void();" style="cursor: default;">...</a> | ||
</li> | ||
</f:if> | ||
<f:for each="{pagination.pages}" as="page"> | ||
<f:if condition="{page.isCurrent}"> | ||
<f:then> | ||
<li class="active"> | ||
<a href="#">{page.number}</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<li> | ||
<f:if condition="{page.number} > 1"> | ||
<f:then> | ||
<f:widget.link arguments="{currentPage: page.number}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">{page.number}</f:widget.link> | ||
</f:then> | ||
<f:else> | ||
<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">{page.number}</f:widget.link> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:else> | ||
</f:if> | ||
</f:for> | ||
<f:if condition="{pagination.hasMorePages}"> | ||
<li> | ||
<a href="javascript:void();" style="cursor: default;">...</a> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}"> | ||
<li class="last"> | ||
<f:widget.link arguments="{currentPage: pagination.numberOfPages}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}">{pagination.numberOfPages}</f:widget.link> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.nextPage}"> | ||
<li class="next"> | ||
<f:widget.link arguments="{currentPage: pagination.nextPage}" addQueryStringMethod="{configuration.addQueryStringMethod}" section="{configuration.section}"><f:translate key="widget.pagination.next" /></f:widget.link> | ||
</li> | ||
</f:if> | ||
</ul> | ||
</f:section> |