Indefero

Indefero Commit Details


Date:2008-12-01 15:16:28 (16 years 20 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:ec22b2c8c27983078b7f73ce40e7a0840167c4a6
Parents: da23f2b915183cdd13028f749da65c1ed9ea8b50
Message:Grouped the items in the timeline by day.

Changes:

File differences

src/IDF/Timeline/Paginator.php
2626
2727
2828
29
30
2931
3032
3133
......
3739
3840
3941
40
42
43
44
45
46
47
48
49
50
51
52
53
54
4155
4256
*/
class IDF_Timeline_Paginator extends Pluf_Paginator
{
public $current_day = null;
/**
* Generate a standard "line" of the body.
*
{
$doc = Pluf::factory($item->model_class, $item->model_id);
$doc->public_dtime = $item->public_dtime;
return $doc->timelineFragment($item->request);
$item_day = Pluf_Template_dateFormat($item->creation_dtime,
'%y-%m-%d');
$out = '';
if ($this->current_day == null or
Pluf_Date::dayCompare($this->current_day, $item_day) != 0) {
$day = Pluf_Template_dateFormat($item->creation_dtime);
if ($item_day == Pluf_Template_timeFormat(time(), 'y-m-d')) {
$day = __('Today');
}
$out = '<tr><th colspan="2">'.$day.'</th></tr>'."\n";
$this->current_day = $item_day;
}
return $out.$doc->timelineFragment($item->request);
}
}

Archive Download the corresponding diff file

Page rendered in 0.07730s using 13 queries.