Changeset 218 for trunk/trax/vendor/trax

Show
Ignore:
Timestamp:
06/06/06 21:03:11 (6 years ago)
Author:
john
Message:

changed pagination_range_text in ARHelper

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php

    r215 r218  
    618618        return $html; 
    619619    }     
    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.") { 
    622622        if(is_object($object_name_or_object)) { 
    623623            $object = $object_name_or_object; 
    624624        } else { 
    625             $object = $this->object($object_name_or_object);   
     625            $object = $this->object($object_name_or_object); 
    626626        } 
    627627 
    628628        if(!is_object($object)) { 
    629             return null;     
     629            return null; 
    630630        } 
    631631        $end = $object->rows_per_page * $object->page; 
     
    634634            $end = $object->pagination_count; 
    635635        } 
    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 
    640640} 
    641641