| 1 |
<?php
|
| 2 |
// $Id:
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Format a summary of the current pager position, such as "6 through 10 of 52".
|
| 6 |
*
|
| 7 |
* @param $limit
|
| 8 |
* The number of query results to display per page.
|
| 9 |
* @param $element
|
| 10 |
* An optional integer to distinguish between multiple pagers on one page.
|
| 11 |
* @param $format
|
| 12 |
* A printf-style format string for customizing the pager text.
|
| 13 |
* @return
|
| 14 |
* An HTML string that generates this piece of the query pager.
|
| 15 |
*
|
| 16 |
* @ingroup themeable
|
| 17 |
*/
|
| 18 |
function theme_pager_detail($limit, $element = 0, $format = '%d through %d of %d.') {
|
| 19 |
global $pager_page_array, $pager_total, $pager_total_items;
|
| 20 |
|
| 21 |
$output = '<div class="pager-detail">';
|
| 22 |
if ($pager_total[$element] > 1) {
|
| 23 |
$output .= sprintf($format,
|
| 24 |
$pager_page_array[$element] * $limit + 1,
|
| 25 |
min($pager_total_items[$element], ($pager_page_array[$element] + 1) * $limit),
|
| 26 |
$pager_total_items[$element]);
|
| 27 |
}
|
| 28 |
$output .= '</div>';
|
| 29 |
|
| 30 |
return $output;
|
| 31 |
}
|
| 32 |
|
| 33 |
|
| 34 |
?>
|