summaryrefslogtreecommitdiff
path: root/includes/pager.inc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-01-15 00:04:20 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-01-15 00:04:20 +0000
commit3329ad927c93b86587ec6ef3b7804ddcf1948384 (patch)
tree919d52e7d425f72a265b68fa0c620200ab461b00 /includes/pager.inc
parent88cdbf9185ac8df288932ef81faefa191f4475fc (diff)
downloadbrdo-3329ad927c93b86587ec6ef3b7804ddcf1948384.tar.gz
brdo-3329ad927c93b86587ec6ef3b7804ddcf1948384.tar.bz2
- #44498: Clean up pager / make more accessible
Diffstat (limited to 'includes/pager.inc')
-rw-r--r--includes/pager.inc34
1 files changed, 25 insertions, 9 deletions
diff --git a/includes/pager.inc b/includes/pager.inc
index c5f10ffd3..186810fb7 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -108,11 +108,11 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a
if ($pager_total[$element] > 1) {
$output .= '<div id="pager">';
- $output .= theme('pager_first', ($tags[0] ? $tags[0] : t('&#171; first')), $limit, $element, $parameters);
- $output .= theme('pager_previous', ($tags[1] ? $tags[1] : t('&#8249; previous')), $limit, $element, 1, $parameters);
+ $output .= theme('pager_first', ($tags[0] ? $tags[0] : t('« first')), $limit, $element, $parameters);
+ $output .= theme('pager_previous', ($tags[1] ? $tags[1] : t('‹ previous')), $limit, $element, 1, $parameters);
$output .= theme('pager_list', $limit, $element, ($tags[2] ? $tags[2] : 9 ), '', $parameters);
- $output .= theme('pager_next', ($tags[3] ? $tags[3] : t('next &#8250;')), $limit, $element, 1, $parameters);
- $output .= theme('pager_last', ($tags[4] ? $tags[4] : t('last &#187;')), $limit, $element, $parameters);
+ $output .= theme('pager_next', ($tags[3] ? $tags[3] : t('next ›')), $limit, $element, 1, $parameters);
+ $output .= theme('pager_last', ($tags[4] ? $tags[4] : t('last »')), $limit, $element, $parameters);
$output .= '</div>';
return $output;
@@ -311,7 +311,7 @@ function theme_pager_list($limit, $element = 0, $quantity = 5, $text = '', $para
if ($i != $pager_max) {
$output .= $text;
if ($i > 1) {
- $output .= '<span class="pager-ellipses">&#8230;</span>';
+ $output .= '<span class="pager-ellipsis">…</span>';
}
// Now generate the actual pager piece.
@@ -328,7 +328,7 @@ function theme_pager_list($limit, $element = 0, $quantity = 5, $text = '', $para
}
if ($i < $pager_max) {
- $output .= '<span class="pager-ellipses">&#8230;</span>';
+ $output .= '<span class="pager-ellipsis">…</span>';
}
}
$output .= '</span>';
@@ -361,10 +361,26 @@ function theme_pager_link($text, $page_new, $element, $parameters = array(), $at
$query[] = $key .'='. $value;
}
- // Set each pager link title with correct page number (clean out HTML entities, title doesn't like those)
- $attributes['title'] = is_numeric($text) ? 'goto page ' . $text : 'goto ' . str_replace(array('&#171; ', '&#8249; ', ' &#8250;', ' &#187;'), '', $text) . ' page';
+ // Set each pager link title
+ if (!isset($attributes['title'])) {
+ static $titles = null;
+ if (!isset($titles)) {
+ $titles = array(
+ t('« first') => t('Go to first page'),
+ t('‹ previous') => t('Go to previous page'),
+ t('next ›') => t('Go to next page'),
+ t('last »') => t('Go to last page'),
+ );
+ }
+ if (isset($titles[$text])) {
+ $attributes['title'] = $titles[$text];
+ }
+ else if (is_numeric($text)) {
+ $attributes['title'] = t('Go to page %number', array('%number' => $text));
+ }
+ }
- return l($text, $_GET['q'], $attributes, count($query) ? implode('&', $query) : NULL, NULL, FALSE, TRUE);
+ return l($text, $_GET['q'], $attributes, count($query) ? implode('&', $query) : NULL);
}
/**