mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-02 20:19:27 +01:00
remove listview from calendar_list title, as it offers no additional information. Use get_weekday_start in calendar_list as used in calendar_month; Use numEntries for calendar_month, as passing no number of entries to fetch, will result in applying the default number of entries, or the number of entries to fetch for the anonymous user
This commit is contained in:
parent
5283f3098f
commit
e757e53819
@ -277,20 +277,25 @@ class module_calendar_list extends Module
|
|||||||
|
|
||||||
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
||||||
{
|
{
|
||||||
$first = (int) (strtotime(get_var('date',array('POST','GET'))) +
|
$start = (int) (strtotime(get_var('date',array('POST','GET'))) +
|
||||||
(60 * 60 * 24 * 7 * $dateOffset));
|
(60 * 60 * 24 * 7 * $dateOffset));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$first = (int) ($this->bo->now_su +
|
$start = (int) ($this->bo->now_su +
|
||||||
(60 * 60 * 24 * 7 * $dateOffset));
|
(60 * 60 * 24 * 7 * $dateOffset));
|
||||||
}
|
}
|
||||||
|
$first = $this->ui->datetime->get_weekday_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));
|
||||||
|
|
||||||
if ($arguments['showTitle'])
|
if ($arguments['showTitle'])
|
||||||
{
|
{
|
||||||
$html .= '<div id="divAppboxHeader">'.$GLOBALS['egw_info']['apps']['calendar']['title'].' - '.lang('Listview').": ";
|
$html .= '<div id="divAppboxHeader">'.$GLOBALS['egw_info']['apps']['calendar']['title'].' - ';
|
||||||
$html .= lang('After %1',$this->bo->long_date($first));
|
$html .= lang('After %1',$this->bo->long_date($first));
|
||||||
$html .= "</div>";
|
$html .= "</div>";
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,12 @@ class module_calendar_month extends Module
|
|||||||
'type' => 'textfield',
|
'type' => 'textfield',
|
||||||
'label' => lang('Search string for the events'),
|
'label' => lang('Search string for the events'),
|
||||||
),
|
),
|
||||||
|
'numEntries' => array(
|
||||||
|
'type' => 'textfield',
|
||||||
|
'label' => lang('Max. Number of entries to show (leave empty for no restriction)'),
|
||||||
|
'default' => '',
|
||||||
|
'params' => array('size' => 1),
|
||||||
|
),
|
||||||
'users' => array(
|
'users' => array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'options' => array(),
|
'options' => array(),
|
||||||
@ -274,6 +280,10 @@ class module_calendar_month extends Module
|
|||||||
{
|
{
|
||||||
$search_params['users'] = $arguments['users'];
|
$search_params['users'] = $arguments['users'];
|
||||||
}
|
}
|
||||||
|
if ($arguments['numEntries'])
|
||||||
|
{
|
||||||
|
$search_params['num_rows'] = (int) $arguments['numEntries'];
|
||||||
|
}
|
||||||
$rows = $this->bo->search($search_params);
|
$rows = $this->bo->search($search_params);
|
||||||
if ($arguments['showWeeks'])
|
if ($arguments['showWeeks'])
|
||||||
{
|
{
|
||||||
@ -306,7 +316,7 @@ class module_calendar_month extends Module
|
|||||||
{
|
{
|
||||||
$GLOBALS['egw']->template = new Template;
|
$GLOBALS['egw']->template = new Template;
|
||||||
}
|
}
|
||||||
$html .= $this->ui->timeGridWidget($this->ui->tagWholeDayOnTop($week),$weeks == 2 ? 30 : 60,200,'',$title,0,$week_start+WEEK_s >= $this->last);
|
$html .= $this->ui->timeGridWidget($this->ui->tagWholeDayOnTop($week),$weeks == 2 ? 30 : 60,200,'',$title,0,$week_start+WEEK_s >= $last);
|
||||||
}
|
}
|
||||||
// Initialize Tooltips
|
// Initialize Tooltips
|
||||||
$html .= '<script language="JavaScript" type="text/javascript" src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js"></script>'."\n";
|
$html .= '<script language="JavaScript" type="text/javascript" src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js"></script>'."\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user