aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/text.php22
-rwxr-xr-xindex.php2
-rw-r--r--mod/directory.php2
-rw-r--r--view/tpl/alt_pager.tpl4
4 files changed, 15 insertions, 15 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
diff --git a/index.php b/index.php
index 7e3fd0ef1..cf9262bf7 100755
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
/**
*
- * Friendica Red
+ * Red Matrix
*
*/
diff --git a/mod/directory.php b/mod/directory.php
index 7aeba3504..46fc34e16 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -166,7 +166,7 @@ function directory_content(&$a) {
));
- $o .= alt_pager($a,$j['records'], t('more'), t('back'));
+ $o .= alt_pager($a,$j['records'], t('next page'), t('previous page'));
}
else {
diff --git a/view/tpl/alt_pager.tpl b/view/tpl/alt_pager.tpl
new file mode 100644
index 000000000..140255eca
--- /dev/null
+++ b/view/tpl/alt_pager.tpl
@@ -0,0 +1,4 @@
+<div class="pager">
+{{if $has_less}}<a href="{{$url}}&page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}}
+{{if $has_more}}{{$if $has_less}}&nbsp;|&nbsp;{{/if}}<a href="{{$url}}&page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}}
+</div>