1
0

Revert "Fix pagination for "stable archives" in themes."

This reverts commit d9b3333556.

With this - now reverted - commit, the prev/next
arrows in pagination were swapped because they
were the wrong way around. Unfortunately, later on,
in ebb852d400, the
root cause was fixes by "unswapping" the prev/next
links in core, so now the pagination arrows were
... eh ... wrongly swapped. So this commit has to
be reverted.

Should fix #625 for good this time.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein
2019-08-24 08:39:01 +02:00
parent dd46e39884
commit ecd3c9fa0b
3 changed files with 12 additions and 36 deletions

View File

@ -114,14 +114,6 @@
{if $footer_totalPages >1 && !isset($staticpage_pagetitle)}
<nav class="pagination pull-right">
{assign var="archiveSortStable" value="`serendipity_getConfigVar key='archiveSortStable'`"}
{if $archiveSortStable}
{assign var="linkPrevPage" value="`$footer_next_page`"}
{assign var="linkNextPage" value="`$footer_prev_page`"}
{else}
{assign var="linkPrevPage" value="`$footer_prev_page`"}
{assign var="linkNextPage" value="`$footer_next_page`"}
{/if}
{assign var="paginationStartPage" value="`$footer_currentPage-3`"}
{if $footer_currentPage+3 > $footer_totalPages}
{assign var="paginationStartPage" value="`$footer_totalPages-4`"}
@ -129,8 +121,8 @@
{if $paginationStartPage <= 0}
{assign var="paginationStartPage" value="1"}
{/if}
{if $linkPrevPage}
<a class="btn btn-md btn-default btn-theme" title="{$CONST.PREVIOUS_PAGE}" href="{$linkPrevPage}"><i class="fa fa-arrow-left" aria-hidden="true"></i><span class="sr-only">{$CONST.PREVIOUS_PAGE}</span></a>
{if $footer_prev_page}
<a class="btn btn-md btn-default btn-theme" title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><i class="fa fa-arrow-left" aria-hidden="true"></i><span class="sr-only">{$CONST.PREVIOUS_PAGE}</span></a>
{/if}
{if $paginationStartPage > 1}
<a class="btn btn-md btn-default btn-theme" href="{'1'|string_format:$footer_pageLink}">1</a>
@ -151,8 +143,8 @@
{if $smarty.section.i.index <= $footer_totalPages}
<a class="btn btn-md btn-default btn-theme" href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a>
{/if}
{if $linkNextPage}
<a class="btn btn-md btn-default btn-theme" title="{$CONST.NEXT_PAGE}" href="{$linkNextPage}"><i class="fa fa-arrow-right" aria-hidden="true"></i><span class="sr-only">{$CONST.NEXT_PAGE}</span></a>
{if $footer_next_page}
<a class="btn btn-md btn-default btn-theme" title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><i class="fa fa-arrow-right" aria-hidden="true"></i><span class="sr-only">{$CONST.NEXT_PAGE}</span></a>
{/if}
</nav>
{/if}