pluf2

pluf2 Commit Details


Date:2009-01-02 04:18:25 (15 years 11 months ago)
Author:Loic d'Anterroches
Branch:master
Commit:6dfaa8c63a048e9f0c9371a3f62aedfcc718fc5b
Parents: d8b2a34328cbcffeb7f5a1f7ad14598528a6b59a
Message:Added the ability to set a per column class in the paginator.

Changes:

File differences

src/Pluf/Paginator.php
8484
8585
8686
87
88
89
90
91
92
93
94
95
96
8797
8898
8999
......
466476
467477
468478
469
479
480
470481
471482
472483
......
677688
678689
679690
691
692
693
694
695
696
680697
681698
682699
* you can create new columns in the table.
*/
protected $list_display = array();
/**
* Extra classes that will be applied to the td of each cell of
* each column.
*
* If you have 3 columns and put array('one', '', 'foo') all the
* td of the first column will have the class 'one' set and the
* tds of the last column will have the 'foo' class set.
*/
public $extra_classes = array();
/**
* The fields being searched.
if ($i == 0) {
$text = $this->getEditAction($text, $item);
}
$out.='<td>'.$text.'</td>';
$class = (isset($this->extra_classes[$i]) and $this->extra_classes[$i] != '') ? ' class="'.$this->extra_classes[$i].'"' : '';
$out.='<td'.$class.'>'.$text.'</td>';
$i++;
}
} else {
return Pluf_Template_dateFormat($item->$field, '%Y-%m-%d %H:%M:%S');
}
function Pluf_Paginator_DateYMDHM($field, $item)
{
Pluf::loadFunction('Pluf_Template_dateFormat');
return Pluf_Template_dateFormat($item->$field, '%Y-%m-%d %H:%M');
}
function Pluf_Paginator_DateYMD($field, $item)
{
Pluf::loadFunction('Pluf_Template_dateFormat');

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05745s using 13 queries.