forked from lochmueller/calendarize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace pagination widget in FE list
Instead of using the widget.paginate, the indices are now paginated with the new pagination API. To limit the amount of pages, georgringer/numbered-pagination is suggested. Old templates with widget.paginate should still continue to work (in TYPO3 10 or until removed). Related: lochmueller#542
- Loading branch information
Showing
11 changed files
with
114 additions
and
19 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<ul class="f3-widget-paginator"> | ||
<f:if condition="{pagination.previousPageNumber} && {pagination.previousPageNumber} >= {pagination.firstPageNumber}"> | ||
<f:then> | ||
<f:comment> | ||
<li class="first"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: 1})}" title="{f:translate(key:'pagination.first')}"> | ||
<i class="material-icons">first_page</i> | ||
</a> | ||
</li> | ||
</f:comment> | ||
<li class="previous"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.previousPageNumber})}" title="{f:translate(key:'pagination.previous')}"> | ||
{f:translate(key:'widget.pagination.previous', extensionName: 'fluid')} | ||
</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<f:comment> | ||
<li class="disabled"><span><i class="material-icons">first_page</i></span></li> | ||
<li class="disabled"><span>{f:translate(key:'widget.pagination.previous', extensionName: 'fluid')}</span></li> | ||
</f:comment> | ||
</f:else> | ||
</f:if> | ||
<f:if condition="{pagination.hasLessPages}"> | ||
<li>…</li> | ||
</f:if> | ||
<f:for each="{pagination.allPageNumbers}" as="page"> | ||
<li class="{f:if(condition: '{page} == {paginator.currentPageNumber}', then:'current')}"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: page})}">{page}</a> | ||
</li> | ||
</f:for> | ||
<f:if condition="{pagination.hasMorePages}"> | ||
<li>…</li> | ||
</f:if> | ||
<f:if condition="{pagination.nextPageNumber} && {pagination.nextPageNumber} <= {pagination.lastPageNumber}"> | ||
<f:then> | ||
<li class="next"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.nextPageNumber})}" title="{f:translate(key:'pagination.next')}"> | ||
{f:translate(key:'widget.pagination.next', extensionName: 'fluid')} | ||
</a> | ||
</li> | ||
<f:comment> | ||
<li class="last"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.lastPageNumber})}" title="{f:translate(key:'pagination.last')}"> | ||
last | ||
</a> | ||
</li> | ||
</f:comment> | ||
</f:then> | ||
<f:else> | ||
<f:comment> | ||
<li class="disabled"><span>{f:translate(key:'widget.pagination.next', extensionName: 'fluid')}</span></li> | ||
<li class="disabled"><span>last page</span></li> | ||
</f:comment> | ||
</f:else> | ||
</f:if> | ||
</ul> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<f:layout name="Default" /> | ||
|
||
<f:section name="Main"> | ||
<f:render partial="List" arguments="{settings: settings, indices: indices, searchParameter: searchParameter, searchMode: searchMode,contentObject:contentObject}" /> | ||
<f:render partial="List" arguments="{settings: settings, indices: indices, searchParameter: searchParameter, searchMode: searchMode,contentObject:contentObject, pagination: pagination}" /> | ||
</f:section> |
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
1 change: 1 addition & 0 deletions
1
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
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