Index: includes/pager.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/pager.inc,v
retrieving revision 1.54
diff -u -p -r1.54 pager.inc
--- includes/pager.inc 13 Apr 2006 08:25:27 -0000 1.54
+++ includes/pager.inc 12 Jun 2006 15:47:51 -0000
@@ -105,9 +105,9 @@ function pager_get_querystring() {
* retrieve a pager control so that users can view other results.
*
* @param $tags
- * An array of labels for the controls in the pager.
- * @param $limit
- * The number of query results to display per page.
+ * An associative array of labels for the controls in the pager. Possibly keys
+ * include 'first', 'previous', 'next' and 'last'. An additional key named
+ * 'list' controls the number of page links to be displayed.
* @param $element
* An optional integer to distinguish between multiple pagers on one page.
* @param $parameters
@@ -119,19 +119,28 @@ function pager_get_querystring() {
*/
function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = array()) {
global $pager_total;
- $output = '';
+ $output = '';
if ($pager_total[$element] > 1) {
- $output .= '
';
-
- return $output;
+ $labels = array(
+ 'first' => t('« first'),
+ 'previous' => t('‹ previous'),
+ 'list' => 9,
+ 'next' => t('next ›'),
+ 'last' => t('last »')
+ );
+ $labels = array_merge($labels, $tags);
+
+ $output .= '';
}
+
+ return $output;
}
/**
@@ -239,7 +248,8 @@ function theme_pager_next($text, $limit,
}
// The next page is not the last page.
else {
- $output = theme('pager_link', $text, $page_new, $element, $parameters, array('class' => 'pager-next'));
+ $class = is_numeric($text) ? 'pager-page' : 'pager-next';
+ $output = theme('pager_link', $text, $page_new, $element, $parameters, array('class' => $class));
}
}
@@ -295,7 +305,7 @@ function theme_pager_last($text, $limit,
function theme_pager_list($limit, $element = 0, $quantity = 5, $text = '', $parameters = array()) {
global $pager_page_array, $pager_total;
- $output = '';
return $output;
}
@@ -381,26 +390,26 @@ function theme_pager_link($text, $page_n
$query[] = $querystring;
}
- // Set each pager link title
+ // 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'),
+ t('« first') => t('Go to the first page.'),
+ t('‹ previous') => t('Go to the previous page.'),
+ t('next ›') => t('Go to the next page.'),
+ t('last »') => t('Go to the 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));
+ $attributes['title'] = t('Go to page %number.', array('%number' => $text));
}
}
- return l($text, $_GET['q'], $attributes, count($query) ? implode('&', $query) : NULL);
+ return ''. l($text, $_GET['q'], $attributes, count($query) ? implode('&', $query) : NULL) .'';
}
/**
@@ -426,5 +435,3 @@ function pager_load_array($value, $eleme
$new_array[$element] = (int)$value;
return $new_array;
}
-
-
Index: misc/drupal.css
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.css,v
retrieving revision 1.150
diff -u -p -r1.150 drupal.css
--- misc/drupal.css 23 May 2006 02:11:17 -0000 1.150
+++ misc/drupal.css 12 Jun 2006 15:47:54 -0000
@@ -1,4 +1,4 @@
-/* $Id: drupal.css,v 1.150 2006/05/23 02:11:17 drumm Exp $ */
+/* $Id: drupal.css,v 1.147.2.2 2006/05/08 17:57:29 killes Exp $ */
/*
** HTML elements
@@ -69,7 +69,7 @@ li.leaf {
padding: 0.2em 0.5em 0 0;
margin: 0;
}
-li a.active {
+.tabs li a.active {
color: #000;
}
td.menu-disabled {
@@ -178,13 +178,17 @@ tr.odd .form-item, tr.even .form-item {
.ok {
color: #080;
}
-#pager {
+.pager {
clear: both;
text-align: center;
}
-#pager a, #pager strong.pager-current {
+.pager li {
+ display: inline;
padding: 0.5em;
}
+.pager-current {
+ font-weight: bold;
+}
.path {
padding-bottom: 0.7em;
font-size: 1.1em;