From 5d3ebeff5ddd1201ae83e2a3ae4931c6a93d44c5 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 27 Mar 2012 16:02:21 +0200 Subject: [PATCH] Updated template plugins to match new structure --- .../PagesFunctionTemplatePlugin.class.php | 66 ++++++-------- ...SmallpagesFunctionTemplatePlugin.class.php | 85 +++---------------- 2 files changed, 39 insertions(+), 112 deletions(-) diff --git a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php index f486ad2030..8a1f4bfdaf 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php @@ -30,7 +30,6 @@ use wcf\util\StringUtil; */ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin { const SHOW_LINKS = 11; - const SHOW_SUB_LINKS = 20; /** * Inserts the page number into the link. @@ -51,16 +50,33 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin { * @param string $link * @param integer $pageNo * @param integer $activePage - * @param boolean $break * @return string */ protected function makeLink($link, $pageNo, $activePage, $break = false) { // first page if ($activePage != $pageNo) { - return '
  • '.StringUtil::formatInteger($pageNo).'
  • '."\n"; + return '
  • '.StringUtil::formatInteger($pageNo).'
  • '."\n"; } else { - return '
  • '.StringUtil::formatInteger($pageNo).'
  • '."\n"; + return '
  • '.StringUtil::formatInteger($pageNo).'
  • '."\n"; + } + } + + protected function makePreviousLink($link, $pageNo) { + if ($pageNo > 1) { + return ''."\n"; + } + else { + return ''."\n"; + } + } + + protected function makeNextLink($link, $pageNo, $pages) { + if ($pageNo && $pageNo < $pages) { + return ''."\n"; + } + else { + return ''."\n"; } } @@ -96,22 +112,16 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin { } // open div and ul - $html .= "