Changeset 218 for trunk/trax/vendor/trax
- Timestamp:
- 06/06/06 21:03:11 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php
r215 r218 618 618 return $html; 619 619 } 620 621 function pagination_range_text($object_name_or_object, $ range_text = "Showing", $range_type = "items") {620 621 function pagination_range_text($object_name_or_object, $format = "Showing %d - %d of %d items.") { 622 622 if(is_object($object_name_or_object)) { 623 623 $object = $object_name_or_object; 624 624 } else { 625 $object = $this->object($object_name_or_object); 625 $object = $this->object($object_name_or_object); 626 626 } 627 627 628 628 if(!is_object($object)) { 629 return null; 629 return null; 630 630 } 631 631 $end = $object->rows_per_page * $object->page; … … 634 634 $end = $object->pagination_count; 635 635 } 636 637 return "{$range_text} {$start} - {$end} of {$object->pagination_count} {$range_type}.";638 } 639 636 637 return sprintf($format, $start, $end, $object->pagination_count); 638 } 639 640 640 } 641 641
