From c891d4610494a7df64e039aa15db73e352095f41 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 30 Oct 2014 08:33:46 +0000 Subject: [PATCH] * Calendar: allow admin to set a "default calendar view" used for first display of calendar, afterwards last selected view is used --- calendar/inc/class.calendar_hooks.inc.php | 26 +++++++++++++++++++++++ calendar/lang/egw_de.lang | 1 + calendar/lang/egw_en.lang | 1 + 3 files changed, 28 insertions(+) diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 70532aca40..0180eb7738 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -735,6 +735,32 @@ class calendar_hooks ), ); + if ($hook_data['type'] === 'default') + { + $settings = array_slice($settings, 0, 1, true) + array( + 'defaultcalendar' => array( + 'type' => 'select', + 'label' => 'Default calendar view', + 'name' => 'defaultcalendar', + 'help' => 'Only used for first viewing of calendar, afterwards last selected view is used.', + 'values' => array( + 'day' => lang('Dayview'), + 'day4' => lang('four days view'), + 'week' => lang('Weekview'), + 'weekN' => lang('Multiple week view'), + 'month' => lang('Monthview'), + 'year' => lang('Yearview'), + 'planner' => lang('Planner'), + 'listview' => lang('listview'), + ), + 'xmlrpc' => True, + 'admin' => False, + 'default' => 'week', + + ), + ) + array_slice($settings, 1, count($settings)-1, true); + } + return $settings; } diff --git a/calendar/lang/egw_de.lang b/calendar/lang/egw_de.lang index 760535acb9..3331f79bdf 100644 --- a/calendar/lang/egw_de.lang +++ b/calendar/lang/egw_de.lang @@ -381,6 +381,7 @@ one week calendar de eine Woche one year calendar de ein Jahr only group-events calendar de nur Gruppentermine only the initial date of that recuring event is checked! calendar de Nur das Startdatum diese wiederholenden Termins wird geprüft! +only used for first viewing of calendar, afterwards last selected view is used. calendar de Wird nur bei der Erstanzeige des Kalenders benutzt, danach immer die zuletzt ausgewählte Anzeige. open todo's: calendar de unerledigte Aufgaben: optional calendar de Optional overlap holiday calendar de überlappender Feiertag diff --git a/calendar/lang/egw_en.lang b/calendar/lang/egw_en.lang index d2492dfb65..82070e586e 100644 --- a/calendar/lang/egw_en.lang +++ b/calendar/lang/egw_en.lang @@ -381,6 +381,7 @@ one week calendar en One week one year calendar en One year only group-events calendar en Only group events only the initial date of that recuring event is checked! calendar en Only the initial date of that recurring event is checked! +only used for first viewing of calendar, afterwards last selected view is used. calendar en Only used for first viewing of calendar, afterwards last selected view is used. open todo's: calendar en Open ToDo's: optional calendar en Optional overlap holiday calendar en Overlap holiday