parent
8ceef96d28
commit
e42b7b3026
|
@ -15,10 +15,13 @@ use DateInterval;
|
||||||
*/
|
*/
|
||||||
class HistoryColorGrid extends AbstractWidget {
|
class HistoryColorGrid extends AbstractWidget {
|
||||||
|
|
||||||
const ORIENTATION_VERTICAL = 'vertical';
|
const CAL_GROW_INTO_PAST = 'past';
|
||||||
|
const CAL_GROW_INTO_PRESENT = 'present';
|
||||||
|
|
||||||
|
const ORIENTATION_VERTICAL = 'vertical';
|
||||||
const ORIENTATION_HORIZONTAL = 'horizontal';
|
const ORIENTATION_HORIZONTAL = 'horizontal';
|
||||||
|
|
||||||
|
public $weekFlow = self::CAL_GROW_INTO_PAST;
|
||||||
public $orientation = self::ORIENTATION_VERTICAL;
|
public $orientation = self::ORIENTATION_VERTICAL;
|
||||||
|
|
||||||
private $maxValue = 1;
|
private $maxValue = 1;
|
||||||
|
@ -244,6 +247,12 @@ class HistoryColorGrid extends AbstractWidget {
|
||||||
$weeks[$week][$weekday] = $date;
|
$weeks[$week][$weekday] = $date;
|
||||||
};
|
};
|
||||||
$months[$week] = $month;
|
$months[$week] = $month;
|
||||||
|
if ($this->weekFlow == self::CAL_GROW_INTO_PAST) {
|
||||||
|
return array(
|
||||||
|
'weeks' => array_reverse($weeks),
|
||||||
|
'months' => array_reverse($months)
|
||||||
|
);
|
||||||
|
}
|
||||||
return array(
|
return array(
|
||||||
'weeks' => $weeks,
|
'weeks' => $weeks,
|
||||||
'months' => $months
|
'months' => $months
|
||||||
|
|
Loading…
Reference in New Issue