mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
allow to determine, if the listview is to use the start of the week for displaying events
This commit is contained in:
parent
7742b606f8
commit
f5284a6324
@ -135,12 +135,17 @@ class module_calendar_list extends Module
|
|||||||
'label' => lang('Should the number of weeks be shown on top of the calendar (only if offset = 0)'),
|
'label' => lang('Should the number of weeks be shown on top of the calendar (only if offset = 0)'),
|
||||||
'default' => false,
|
'default' => false,
|
||||||
),
|
),
|
||||||
|
'useWeekStart' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => lang('Use weekday start'),
|
||||||
|
'default' => false,
|
||||||
|
),
|
||||||
'acceptDateParam' => array(
|
'acceptDateParam' => array(
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'label' => lang('Shall the date parameter be accepted (e.g. from calendar module)?'),
|
'label' => lang('Shall the date parameter be accepted (e.g. from calendar module)?'),
|
||||||
'default' => false,
|
'default' => false,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$this->title = lang('Calendar - List');
|
$this->title = lang('Calendar - List');
|
||||||
$this->description = lang("This module displays calendar events as a list.");
|
$this->description = lang("This module displays calendar events as a list.");
|
||||||
}
|
}
|
||||||
@ -277,18 +282,21 @@ class module_calendar_list extends Module
|
|||||||
|
|
||||||
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
||||||
{
|
{
|
||||||
$start = (int) (strtotime(get_var('date',array('POST','GET'))) +
|
$first = $start = (int) (strtotime(get_var('date',array('POST','GET'))) +
|
||||||
(60 * 60 * 24 * 7 * $dateOffset));
|
(60 * 60 * 24 * 7 * $dateOffset));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$start = (int) ($this->bo->now_su +
|
$first = $start = (int) ($this->bo->now_su +
|
||||||
(60 * 60 * 24 * 7 * $dateOffset));
|
(60 * 60 * 24 * 7 * $dateOffset));
|
||||||
}
|
}
|
||||||
$first = $this->ui->datetime->get_weekday_start(
|
if ($arguments['useWeekStart'])
|
||||||
adodb_date('Y',$start),
|
{
|
||||||
adodb_date('m',$start),
|
$first = $this->ui->datetime->get_weekday_start(
|
||||||
adodb_date('d',$start));
|
adodb_date('Y',$start),
|
||||||
|
adodb_date('m',$start),
|
||||||
|
adodb_date('d',$start));
|
||||||
|
}
|
||||||
|
|
||||||
$last = (int) ($first +
|
$last = (int) ($first +
|
||||||
(60 * 60 * 24 * 7 * $weeks));
|
(60 * 60 * 24 * 7 * $weeks));
|
||||||
|
Loading…
Reference in New Issue
Block a user