* Calendar: allow admin to set a "default calendar view" used for first display of calendar, afterwards last selected view is used

This commit is contained in:
Ralf Becker 2014-10-30 08:33:46 +00:00
parent c917cbd865
commit c891d46104
3 changed files with 28 additions and 0 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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