1
0

Add first and last pagination for entries and media items

This commit is contained in:
Ian
2015-10-05 19:10:53 +02:00
parent 7c21de8aa8
commit 2b610dc791
6 changed files with 62 additions and 5 deletions

View File

@ -1604,8 +1604,11 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
);
$pages = ceil($totalImages / $perPage);
$linkPrevious = '?' . $extraParems . 'serendipity[page]=' . ($page-1);
$linkNext = '?' . $extraParems . 'serendipity[page]=' . ($page+1);
$linkPrevious = '?' . $extraParems . '&serendipity[page]=' . ($page-1);
$linkNext = '?' . $extraParems . '&serendipity[page]=' . ($page+1);
// Keep the inner to be build first. Now add first and last. Has to do with adding $param to $extraParems.
$linkFirst = '?' . $extraParems . '&serendipity[page]=' . 1;
$linkLast = '?' . $extraParems . '&serendipity[page]=' . $pages;
if (is_null($lineBreak)) {
$lineBreak = floor(750 / ($serendipity['thumbSize'] + 20));
}
@ -1647,8 +1650,10 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
'show_upload' => $show_upload,
'page' => $page,
'pages' => $pages,
'linkFirst' => $linkFirst,
'linkNext' => $linkNext,
'linkPrevious' => $linkPrevious,
'linkLast' => $linkLast,
'extraParems' => $extraParems,
'totalImages' => $totalImages
));