mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
allow to set/choose the view in home-view
This commit is contained in:
parent
2a801e61fe
commit
01f7688185
@ -53,7 +53,7 @@ class calendar_hooks
|
|||||||
|
|
||||||
$save_app_header = $GLOBALS['egw_info']['flags']['app_header'];
|
$save_app_header = $GLOBALS['egw_info']['flags']['app_header'];
|
||||||
|
|
||||||
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['defaultcalendar'] == 'listview')
|
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['mainscreen_showevents'] == 'listview')
|
||||||
{
|
{
|
||||||
if (!file_exists(EGW_SERVER_ROOT.($et_css_file ='/etemplate/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
|
if (!file_exists(EGW_SERVER_ROOT.($et_css_file ='/etemplate/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
|
||||||
{
|
{
|
||||||
@ -300,7 +300,7 @@ class calendar_hooks
|
|||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => 'show default view on main screen',
|
'label' => 'show default view on main screen',
|
||||||
'name' => 'mainscreen_showevents',
|
'name' => 'mainscreen_showevents',
|
||||||
'values' => $mainpage,
|
'values' => $mainpage+$default,
|
||||||
'help' => 'Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?',
|
'help' => 'Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?',
|
||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False,
|
'admin' => False,
|
||||||
|
@ -271,7 +271,7 @@ class calendar_ui
|
|||||||
'save_owner' => 0,
|
'save_owner' => 0,
|
||||||
'sortby' => 'category',
|
'sortby' => 'category',
|
||||||
'planner_days'=> 0, // full month
|
'planner_days'=> 0, // full month
|
||||||
'view' => $this->bo->cal_prefs['defaultcalendar'],
|
'view' => ($this->bo->cal_prefs['defaultcalendar']?$this->bo->cal_prefs['defaultcalendar']:'day'), // use pref, if exists else use the dayview
|
||||||
'listview_days'=> '', // no range
|
'listview_days'=> '', // no range
|
||||||
) as $state => $default)
|
) as $state => $default)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ class calendar_uilist extends calendar_ui
|
|||||||
'filter' => 'all',
|
'filter' => 'all',
|
||||||
'owner' => $this->user,
|
'owner' => $this->user,
|
||||||
'multiple' => 0,
|
'multiple' => 0,
|
||||||
'view' => $this->bo->cal_prefs['defaultcalendar'],
|
'view' => $this->bo->cal_prefs['mainscreen_showevents'],
|
||||||
));
|
));
|
||||||
egw_session::appsession('calendar_list','calendar',''); // in case there's already something set
|
egw_session::appsession('calendar_list','calendar',''); // in case there's already something set
|
||||||
|
|
||||||
|
@ -198,10 +198,10 @@ class calendar_uiviews extends calendar_ui
|
|||||||
'date' => $this->bo->date2string($this->bo->now_su),
|
'date' => $this->bo->date2string($this->bo->now_su),
|
||||||
'cat_id' => 0,
|
'cat_id' => 0,
|
||||||
'filter' => 'all',
|
'filter' => 'all',
|
||||||
'owner' => substr($this->cal_prefs['defaultcalendar'],0,7) == 'planner' && $this->cal_prefs['planner_start_with_group'] ?
|
'owner' => substr($this->cal_prefs['mainscreen_showevents'],0,7) == 'planner' && $this->cal_prefs['planner_start_with_group'] ?
|
||||||
$this->cal_prefs['planner_start_with_group'] : $this->user,
|
$this->cal_prefs['planner_start_with_group'] : $this->user,
|
||||||
'multiple' => 0,
|
'multiple' => 0,
|
||||||
'view' => $this->bo->cal_prefs['defaultcalendar'],
|
'view' => $this->bo->cal_prefs['mainscreen_showevents'],
|
||||||
));
|
));
|
||||||
|
|
||||||
if (($error = $this->check_owners_access()))
|
if (($error = $this->check_owners_access()))
|
||||||
@ -212,7 +212,7 @@ class calendar_uiviews extends calendar_ui
|
|||||||
{
|
{
|
||||||
$group_warning = '<p class="redItalic" align="center">'.$this->group_warning."</p>\n";
|
$group_warning = '<p class="redItalic" align="center">'.$this->group_warning."</p>\n";
|
||||||
}
|
}
|
||||||
switch($this->cal_prefs['defaultcalendar'])
|
switch($this->cal_prefs['mainscreen_showevents'])
|
||||||
{
|
{
|
||||||
case 'planner_user':
|
case 'planner_user':
|
||||||
case 'planner_cat':
|
case 'planner_cat':
|
||||||
@ -234,6 +234,8 @@ class calendar_uiviews extends calendar_ui
|
|||||||
|
|
||||||
case 'day':
|
case 'day':
|
||||||
return $group_warning.$this->day(true);
|
return $group_warning.$this->day(true);
|
||||||
|
case 'day4':
|
||||||
|
return $group_warning.$this->week(4,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user