From: Alexander Ebert Date: Tue, 27 Mar 2012 14:02:21 +0000 (+0200) Subject: Updated template plugins to match new structure X-Git-Tag: 2.0.0_Beta_1~1194 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d3ebeff5ddd1201ae83e2a3ae4931c6a93d44c5;p=GitHub%2FWoltLab%2FWCF.git Updated template plugins to match new structure --- 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 .= "