Skip to content

Commit

Permalink
Do not link current page in pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
okmiim committed May 17, 2022
1 parent ce7a394 commit 647f9e0
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Resources/Private/Partials/Pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@
<li></li>
</f:if>
<f:for each="{pagination.allPageNumbers}" as="page">
<li class="{f:if(condition: '{page} == {paginator.currentPageNumber}', then:'current')}">
<f:render section="PaginationLink" arguments="{actionName:actionName, page: page, title: page, searchMode:searchMode}" contentAs="content">
{page}
</f:render>
</li>
<f:if condition="{page} == {paginator.currentPageNumber}">
<f:then>
<li class="current">{page}</li>
</f:then>
<f:else>
<li>
<f:render section="PaginationLink" arguments="{actionName:actionName, page: page, title: page, searchMode:searchMode}" contentAs="content">
{page}
</f:render>
</li>
</f:else>
</f:if>
</f:for>
<f:if condition="{pagination.hasMorePages}">
<li></li>
Expand Down Expand Up @@ -61,16 +68,14 @@
<f:section name="PaginationLink">
<f:if condition="{searchMode}">
<f:then>
<a class="page-link"
href="{f:uri.action(action:actionName, arguments:{currentPage: page})}"
<a href="#"
title="{title}"
onclick="if(document.getElementById('calendarizePage')){document.getElementById('calendarizePage').value={page};document.getElementById('calendarizeSearchForm').submit();return false;}">
{content}
</a>
</f:then>
<f:else>
<a class="page-link"
href="{f:uri.action(action:actionName, arguments:{currentPage: page})}"
<a href="{f:uri.action(action:actionName, arguments:{currentPage: page})}"
title="{title}">
{content}
</a>
Expand Down

0 comments on commit 647f9e0

Please sign in to comment.