From b866cc26fa95c6fc1df98bef2994350b9eb07231 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Jun 2013 18:16:00 -0700 Subject: templatise alt_pager --- include/text.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index 9f32959b2..ba2f1209c 100755 --- a/include/text.php +++ b/include/text.php @@ -334,20 +334,16 @@ function alt_pager(&$a, $i, $more = '', $less = '') { $pagenum = $a->pager['page']; $url = $a->get_baseurl() . '/' . $stripped; - $o .= '
'; - - if($a->pager['page'] > 1) - $o .= "pager['page'] - 1).'">' . $less . ''; - if($i > 0 && $i == $a->pager['itemspage']) { - if($a->pager['page']>1) - $o .= " | "; - $o .= "pager['page'] + 1).'">' . $more . ''; - } - - - $o .= '
'."\r\n"; + return replace_macros(get_markup_template('alt_pager.tpl'),array( + '$has_less' => (($a->pager['page'] > 1) ? true : false), + '$has_more' => (($i > 0 && $i == $a->pager['itemspage']) ? true : false), + '$less' => $less, + '$more' => $more, + '$url' => $url, + '$prevpage' => $a->pager['page'] - 1, + '$nextpage' => $a->pager['page'] + 1, + )); - return $o; } // Turn user/group ACLs stored as angle bracketed text into arrays -- cgit v1.2.3