summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-04-18 11:49:23 +0200
committerJakob Sack <kde@jakobsack.de>2011-04-18 11:49:23 +0200
commitdd0eb9dd8dbc0d0eff559775d346b5fe04705554 (patch)
tree3b0ee44ee8fab49179dd0d038c709d888b5eb257 /lib
parentf22c05deab263129c7d278d5e4d097cd9ec5573a (diff)
parentb4a74f895efdcc949731abf70c44580461c5c864 (diff)
downloadnextcloud-server-dd0eb9dd8dbc0d0eff559775d346b5fe04705554.tar.gz
nextcloud-server-dd0eb9dd8dbc0d0eff559775d346b5fe04705554.zip
Merge branch 'refactoring' of git://anongit.kde.org/owncloud into refactoring
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php31
1 files changed, 8 insertions, 23 deletions
diff --git a/lib/base.php b/lib/base.php
index ec305250809..352474e1e83 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -242,35 +242,20 @@ class OC_UTIL {
public static function showPageNavi($pagecount,$page,$url) {
$pagelinkcount=8;
- $txt='';
if ($pagecount>1) {
- $txt.='<center><table class="pager" cellspacing="0" cellpadding="0" border="0"><tr><td width="1">';
-
- if ($page>'0') {
- $txt.='<span class="pagerbutton1"><a href="'.$url.($page-1).'">prev</a>&nbsp;&nbsp;</span>';
- }
- $txt.='</td><td width="1">';
-
$pagestart=$page-$pagelinkcount;
if($pagestart<0) $pagestart=0;
$pagestop=$page+$pagelinkcount;
if($pagestop>$pagecount) $pagestop=$pagecount;
- if ($pagestart<>0) $txt.='...';
- for ($i=$pagestart; $i < $pagestop;$i++) {
- if ($i<>$page) {
- $txt.='<a href="'.$url.$i.'">&nbsp;'.($i+1).'&nbsp;</a>';
- } else {
- $txt.='&nbsp;<b>'.($i+1).'</b>&nbsp;';
- }
- }
- if ($pagecount>$pagestop) $txt.='...';
- $txt.='</td><td width="1">';
- if (($page+1)<$pagecount) {
- $txt.='<span class="pagerbutton2"><a href="'.$url.($page+1).'">next</a></span>';
- }
- $txt.='</td></tr></table></center>';
+
+ $tmpl = new OC_TEMPLATE( '', 'part.pagenavi', '' );
+ $tmpl->assign('page',$page);
+ $tmpl->assign('pagecount',$pagecount);
+ $tmpl->assign('pagestart',$pagestart);
+ $tmpl->assign('pagestop',$pagestop);
+ $tmpl->assign('url',$url);
+ $tmpl->printPage();
}
- echo($txt);
}