diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-18 11:10:38 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-18 11:10:38 +0000 |
commit | eb365696982e98b2e2bba1877210213e89277254 (patch) | |
tree | 19fcd1e26084fd69372ee6dbbcae5446ad643973 /views/default | |
parent | 1ca838bcc5c1cca94b49561ceef0496d027cc3e6 (diff) | |
download | elgg-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/default')
-rw-r--r-- | views/default/river/item/list.php | 23 |
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>';
}
?>
|