-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Fix pagination in module for email list
Related: #1119
- Loading branch information
Showing
2 changed files
with
93 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,93 @@ | ||
<nav aria-label="Powermail navigation"> | ||
<ul class="pagination"> | ||
<f:if condition="{pagination.previousPageNumber} && {pagination.previousPageNumber} >= {pagination.firstPageNumber}"> | ||
<f:then> | ||
<li class="page-item previous"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.previousPageNumber})}" | ||
title="{f:translate(key:'pagination.previous')}" class="page-link"> | ||
{f:translate(key:'widget.pagination.previous', extensionName: 'fluid')} | ||
</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
</f:else> | ||
</f:if> | ||
<f:if condition="{pagination.hasLessPages}"> | ||
<li class="page-item">…</li> | ||
</f:if> | ||
<f:for each="{pagination.allPageNumbers}" as="page"> | ||
<li class="page-item {f:if(condition: '{page} == {paginator.currentPageNumber}', then:'active')}"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: page})}" class="page-link">{page}</a> | ||
</li> | ||
</f:for> | ||
<f:if condition="{pagination.hasMorePages}"> | ||
<li class="page-item">…</li> | ||
</f:if> | ||
<f:if condition="{pagination.nextPageNumber} && {pagination.nextPageNumber} <= {pagination.lastPageNumber}"> | ||
<f:then> | ||
<li class="page-item next"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.nextPageNumber})}" | ||
title="{f:translate(key:'pagination.next')}" class="page-link"> | ||
{f:translate(key:'widget.pagination.next', extensionName: 'fluid')} | ||
</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
</f:else> | ||
</f:if> | ||
</ul> | ||
<style> | ||
._pagination { | ||
--bs-pagination-padding-x: 0.75rem; | ||
--bs-pagination-padding-y: 0.375rem; | ||
--bs-pagination-font-size: 0.75rem; | ||
--bs-pagination-color: var(--bs-link-color); | ||
--bs-pagination-bg: #fff; | ||
--bs-pagination-border-width: 1px; | ||
--bs-pagination-border-color: #d7d7d7; | ||
--bs-pagination-border-radius: 0.125rem; | ||
--bs-pagination-hover-color: var(--bs-link-hover-color); | ||
--bs-pagination-hover-bg: #eeeeee; | ||
--bs-pagination-hover-border-color: #d7d7d7; | ||
--bs-pagination-focus-color: var(--bs-link-hover-color); | ||
--bs-pagination-focus-bg: #eeeeee; | ||
--bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(0, 120, 230, 0.25); | ||
--bs-pagination-active-color: #fff; | ||
--bs-pagination-active-bg: #0078e6; | ||
--bs-pagination-active-border-color: #0078e6; | ||
--bs-pagination-disabled-color: #737373; | ||
--bs-pagination-disabled-bg: #fff; | ||
--bs-pagination-disabled-border-color: #d7d7d7; | ||
display: flex; | ||
padding-left: 0; | ||
list-style: none; | ||
} | ||
|
||
._pagination>li {display:inline-block;} | ||
|
||
._pagination > li > a { | ||
position: relative; | ||
float: left; | ||
padding: 6px 12px; | ||
margin-left: -1px; | ||
line-height: 1.42857143; | ||
color: #337ab7; | ||
text-decoration: none; | ||
background-color: #fff; | ||
border: 1px solid #ddd; | ||
} | ||
|
||
._pagination>.active>a, | ||
._pagination>.active>span, | ||
._pagination>.active>a:hover, | ||
._pagination>.active>span:hover, | ||
._pagination>.active>a:focus, | ||
._pagination>.active>span:focus { | ||
z-index: 3; | ||
color: #fff; | ||
cursor: default; | ||
background-color: #337ab7; | ||
border-color: #337ab7; | ||
} | ||
</style> | ||
<ul class="_pagination" style="display: inline-block; padding-left: 0;margin: 20px 0; border-radius: 4px;"> | ||
<f:if condition="{pagination.previousPageNumber} && {pagination.previousPageNumber} >= {pagination.firstPageNumber}"> | ||
<f:then> | ||
<li class="page-item previous"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.previousPageNumber})}" | ||
title="{f:translate(key:'pagination.previous')}" class="page-link"> | ||
{f:translate(key:'widget.pagination.previous', extensionName: 'fluid')} | ||
</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
</f:else> | ||
</f:if> | ||
<f:if condition="{pagination.hasLessPages}"> | ||
<li class="page-item">…</li> | ||
</f:if> | ||
<f:for each="{pagination.allPageNumbers}" as="page"> | ||
<li class="page-item {f:if(condition: '{page} == {paginator.currentPageNumber}', then:'active')}"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: page})}" class="page-link">{page}</a> | ||
</li> | ||
</f:for> | ||
<f:if condition="{pagination.hasMorePages}"> | ||
<li class="page-item">…</li> | ||
</f:if> | ||
<f:if condition="{pagination.nextPageNumber} && {pagination.nextPageNumber} <= {pagination.lastPageNumber}"> | ||
<f:then> | ||
<li class="page-item next"> | ||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.nextPageNumber})}" | ||
title="{f:translate(key:'pagination.next')}" class="page-link"> | ||
{f:translate(key:'widget.pagination.next', extensionName: 'fluid')} | ||
</a> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
</f:else> | ||
</f:if> | ||
</ul> | ||
</nav> |