aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-03 18:16:00 -0700
committerfriendica <info@friendica.com>2013-06-03 18:16:00 -0700
commitb866cc26fa95c6fc1df98bef2994350b9eb07231 (patch)
tree3d25070e6dca73adc5b2430f61aca013c9cc970b /include/text.php
parent1f94429b2cbfd5f86074c671f5293d09bddb7eaa (diff)
downloadvolse-hubzilla-b866cc26fa95c6fc1df98bef2994350b9eb07231.tar.gz
volse-hubzilla-b866cc26fa95c6fc1df98bef2994350b9eb07231.tar.bz2
volse-hubzilla-b866cc26fa95c6fc1df98bef2994350b9eb07231.zip
templatise alt_pager
Diffstat (limited to 'include/text.php')
-rwxr-xr-xinclude/text.php22
1 files changed, 9 insertions, 13 deletions
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 .= '<div class="pager">';
-
- if($a->pager['page'] > 1)
- $o .= "<a href=\"$url"."&page=".($a->pager['page'] - 1).'">' . $less . '</a>';
- if($i > 0 && $i == $a->pager['itemspage']) {
- if($a->pager['page']>1)
- $o .= " | ";
- $o .= "<a href=\"$url"."&page=".($a->pager['page'] + 1).'">' . $more . '</a>';
- }
-
-
- $o .= '</div>'."\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