aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-18 11:10:38 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-18 11:10:38 +0000
commiteb365696982e98b2e2bba1877210213e89277254 (patch)
tree19fcd1e26084fd69372ee6dbbcae5446ad643973 /views
parent1ca838bcc5c1cca94b49561ceef0496d027cc3e6 (diff)
downloadelgg-eb365696982e98b2e2bba1877210213e89277254.tar.gz
elgg-eb365696982e98b2e2bba1877210213e89277254.tar.bz2
pagination on river fixed / styled, and site message styled
git-svn-id: https://code.elgg.org/elgg/trunk@2794 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/river/item/list.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/views/default/river/item/list.php b/views/default/river/item/list.php
index 8b7d37bd0..127d1cdd9 100644
--- a/views/default/river/item/list.php
+++ b/views/default/river/item/list.php
@@ -21,25 +21,26 @@
$nav = '';
+ if (sizeof($vars['items']) > $vars['limit']) {
+ $newoffset = $vars['offset'] + $vars['limit'];
+ $urladdition = 'offset='.$newoffset;
+ if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
+
+ $nav .= '<a class="back" href="'.$nexturl.'">' . elgg_echo('previous') . '</a> ';
+ }
+
if ($vars['offset'] > 0) {
$newoffset = $vars['offset'] - $vars['limit'];
if ($newoffset < 0) $newoffset = 0;
$urladdition = 'offset='.$newoffset;
if (substr_count($baseurl,'?')) $prevurl=$baseurl . '&' . $urladdition; else $prevurl=$baseurl . '?' . $urladdition;
- $nav .= '<a href="'.$prevurl.'">' . elgg_echo('previous') . '</a> ';
- }
-
- if (sizeof($vars['items']) > $vars['limit']) {
- $newoffset = $vars['offset'] + $vars['limit'];
- $urladdition = 'offset='.$newoffset;
- if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
-
- $nav .= '<a href="'.$nexturl.'">' . elgg_echo('next') . '</a> ';
- }
+ $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . '</a> ';
+ }
+
if (!empty($nav)) {
- echo '<div class="river_pagination>"<p>'.$nav.'</p></div>';
+ echo '<div class="river_pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
}
?>