Skip to content
Permalink
Browse files

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

This reverts commit d9b3333.

With this - now reverted - commit, the prev/next
arrows in pagination were swapped because they
were the wrong way around. Unfortunately, later on,
in ebb852d, 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>
  • Loading branch information...
th-h committed Aug 24, 2019
1 parent dd46e39 commit ecd3c9fa0b59c02bfcea4d5294de647106f6f2f2
Showing with 12 additions and 36 deletions.
  1. +4 −12 templates/bulletproof/entries.tpl
  2. +4 −12 templates/timeline/entries.tpl
  3. +4 −12 templates/timeline/index.tpl
@@ -418,23 +418,15 @@

{if $template_option.show_pagination == 'true' && $footer_totalPages > 1}
<div class="pagination">
{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-6`"}
{/if}
{if $paginationStartPage <= 0}
{assign var="paginationStartPage" value="1"}
{/if}
{if $linkPrevPage}
<a title="{$CONST.PREVIOUS_PAGE}" href="{$linkPrevPage}"><span class="pagearrow">&#9668;</span></a>
{if $footer_prev_page}
<a title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><span class="pagearrow">&#9668;</span></a>
{/if}
{if $paginationStartPage > 1}
<a href="{$footer_pageLink|replace:'%s':'1'}">1</a>
@@ -455,8 +447,8 @@
{if $smarty.section.i.index <= $footer_totalPages}
<a href="{$footer_pageLink|replace:'%s':$footer_totalPages}">{$footer_totalPages}</a>
{/if}
{if $linkNextPage}
<a title="{$CONST.NEXT_PAGE}" href="{$linkNextPage}"><span class="pagearrow">&#9658;</span></a>
{if $footer_next_page}
<a title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><span class="pagearrow">&#9658;</span></a>
{/if}
</div>
{/if}
@@ -285,23 +285,15 @@

{if $footer_totalPages >1 }
<nav class="pagination">
{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`"}
{/if}
{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="fas 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="fas 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>
@@ -322,8 +314,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="fas 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="fas fa-arrow-right" aria-hidden="true"></i><span class="sr-only">{$CONST.NEXT_PAGE}</span></a>
{/if}
</nav>
{/if}
@@ -114,23 +114,15 @@

{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`"}
{/if}
{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}

0 comments on commit ecd3c9f

Please sign in to comment.
You can’t perform that action at this time.