diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
commit | 4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch) | |
tree | 969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /views/default/navigation/pagination.php | |
parent | 57a217fd6b708844407486046a1faa23b46cac08 (diff) | |
download | elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2 |
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation/pagination.php')
-rw-r--r-- | views/default/navigation/pagination.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php index 11dfd0e86..9dde51eea 100644 --- a/views/default/navigation/pagination.php +++ b/views/default/navigation/pagination.php @@ -38,12 +38,14 @@ if (isset($vars['nonefound'])) { $totalpages = ceil($count / $limit); $currentpage = ceil($offset / $limit) + 1; +//$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], $word); + //only display if there is content to paginate through or if we already have an offset if (($count > $limit || $offset > 0) && get_context() != 'widget') { ?> - <div class="pagination"> + <div class="pagination clearfloat"> <?php if ($offset > 0) { @@ -53,9 +55,9 @@ if (($count > $limit || $offset > 0) && get_context() != 'widget') { $prevoffset = 0; } - $prevurl = elgg_http_add_url_query_elements($vars['baseurl'], array($word => $prevoffset)); + $prevurl = elgg_http_add_url_query_elements($baseurl, array($word => $prevoffset)); - echo "<a href=\"{$prevurl}\" class=\"pagination_previous\">« ". elgg_echo("previous") ."</a> "; + echo "<a href=\"{$prevurl}\" class='pagination_previous'>« ". elgg_echo("previous") ."</a> "; } if ($offset > 0 || $offset < ($count - $limit)) { @@ -89,16 +91,16 @@ if (($count > $limit || $offset > 0) && get_context() != 'widget') { $prev = 0; foreach($pagesarray as $i) { if (($i - $prev) > 1) { - echo "<span class=\"pagination_more\">...</span>"; + echo "<span class='pagination_more'>...</span>"; } $curoffset = (($i - 1) * $limit); - $counturl = elgg_http_add_url_query_elements($vars['baseurl'], array($word => $curoffset)); + $counturl = elgg_http_add_url_query_elements($base_url, array($word => $curoffset)); if ($curoffset != $offset) { - echo " <a href=\"{$counturl}\" class=\"pagination_number\">{$i}</a> "; + echo " <a href=\"{$counturl}\" class='pagination_number'>{$i}</a> "; } else { - echo "<span class=\"pagination_currentpage\"> {$i} </span>"; + echo "<span class='pagination_currentpage'> {$i} </span>"; } $prev = $i; @@ -112,14 +114,13 @@ if (($count > $limit || $offset > 0) && get_context() != 'widget') { $nextoffset--; } - $nexturl = elgg_http_add_url_query_elements($vars['baseurl'], array($word => $nextoffset)); + $nexturl = elgg_http_add_url_query_elements($baseurl, array($word => $nextoffset)); - echo " <a href=\"{$nexturl}\" class=\"pagination_next\">" . elgg_echo("next") . " »</a>"; + echo " <a href=\"{$nexturl}\" class='pagination_next'>" . elgg_echo("next") . " »</a>"; } ?> - <div class="clearfloat"></div> </div> <?php } // end of pagination check if statement
\ No newline at end of file |