From 9b6e46dc6b245a229b0b5af0efea88c2838ce56a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 19 Apr 2019 15:32:56 +0200 Subject: calendar merge initial commit --- Zotlabs/Widget/Cdav.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Widget/Cdav.php') diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index 589f915c5..c88530c0b 100644 --- a/Zotlabs/Widget/Cdav.php +++ b/Zotlabs/Widget/Cdav.php @@ -113,10 +113,22 @@ class Cdav { } } + $channel_calendars[] = [ + 'ownernick' => $channel['channel_address'], + 'displayname' => $channel['channel_name'], + 'calendarid' => 'channel_calendar', + 'json_source' => '/channel_calendar/json', + 'color' => '#3a87ad', + 'editable' => true, + 'switch' => get_pconfig(local_channel(), 'cdav_calendar', 'channel_calendar') + ]; + $o .= replace_macros(get_markup_template('cdav_widget_calendar.tpl'), [ - '$my_calendars_label' => t('My Calendars'), + '$channel_calendars_label' => t('Channel Calendar'), + '$channel_calendars' => $channel_calendars, + '$my_calendars_label' => t('CalDAV Calendars'), '$my_calendars' => $my_calendars, - '$shared_calendars_label' => t('Shared Calendars'), + '$shared_calendars_label' => t('Shared CalDAV Calendars'), '$shared_calendars' => $shared_calendars, '$sharee_options' => $sharee_options, '$access_options' => $access_options, @@ -127,7 +139,7 @@ class Cdav { '$create_label' => t('Create new calendar'), '$create' => t('Create'), '$create_placeholder' => t('Calendar Name'), - '$tools_label' => t('Calendar Tools'), + '$tools_label' => t('CalDAV Calendar Tools'), '$import_label' => t('Import calendar'), '$import_placeholder' => t('Select a calendar to import to'), '$upload' => t('Upload'), -- cgit v1.2.3 From 327e5d06e12b3ddad0a83a223c1673a4d0dafb15 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 30 Apr 2019 00:09:57 +0200 Subject: calendar merge: implement single event editing UI --- Zotlabs/Widget/Cdav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget/Cdav.php') diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index c88530c0b..20c70903f 100644 --- a/Zotlabs/Widget/Cdav.php +++ b/Zotlabs/Widget/Cdav.php @@ -22,7 +22,7 @@ class Cdav { $o = ''; - if(argc() == 2 && argv(1) === 'calendar') { + if(argc() <= 3 && argv(1) === 'calendar') { $caldavBackend = new \Sabre\CalDAV\Backend\PDO($pdo); -- cgit v1.2.3 From 9efd484e277578bc27f18baac64c0067852044de Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 9 May 2019 13:43:20 +0200 Subject: calendar merge: cleanup and comment out some unused code --- Zotlabs/Widget/Cdav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget/Cdav.php') diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index 20c70903f..7794d7617 100644 --- a/Zotlabs/Widget/Cdav.php +++ b/Zotlabs/Widget/Cdav.php @@ -57,7 +57,7 @@ class Cdav { $switch = get_pconfig(local_channel(), 'cdav_calendar', $sabrecal['id'][0]); - $color = (($sabrecal['{http://apple.com/ns/ical/}calendar-color']) ? $sabrecal['{http://apple.com/ns/ical/}calendar-color'] : '#3a87ad'); + $color = (($sabrecal['{http://apple.com/ns/ical/}calendar-color']) ? $sabrecal['{http://apple.com/ns/ical/}calendar-color'] : '#6cad39'); $editable = (($sabrecal['share-access'] == 2) ? 'false' : 'true'); // false/true must be string since we're passing it to javascript -- cgit v1.2.3 From 274f69526fcfa0858a04a8f745650c6daad22a02 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 10 May 2019 12:18:37 +0200 Subject: calendar merge: implement channel calendar import in cdav/calendar --- Zotlabs/Widget/Cdav.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget/Cdav.php') diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index 7794d7617..7972d839e 100644 --- a/Zotlabs/Widget/Cdav.php +++ b/Zotlabs/Widget/Cdav.php @@ -136,10 +136,11 @@ class Cdav { '$share' => t('Share'), '$edit_label' => t('Calendar name and color'), '$edit' => t('Edit'), - '$create_label' => t('Create new calendar'), + '$create_label' => t('Create new CalDAV calendar'), '$create' => t('Create'), '$create_placeholder' => t('Calendar Name'), - '$tools_label' => t('CalDAV Calendar Tools'), + '$tools_label' => t('Calendar Tools'), + '$tools_options_label' => [t('Channel Calendar'), t('CalDAV Calendars')], '$import_label' => t('Import calendar'), '$import_placeholder' => t('Select a calendar to import to'), '$upload' => t('Upload'), -- cgit v1.2.3 From 70220d8b9c2c80c416225310b6fa1fe1b9b7f2b4 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 10 May 2019 12:21:50 +0200 Subject: typo --- Zotlabs/Widget/Cdav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget/Cdav.php') diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index 7972d839e..ce716b455 100644 --- a/Zotlabs/Widget/Cdav.php +++ b/Zotlabs/Widget/Cdav.php @@ -140,7 +140,7 @@ class Cdav { '$create' => t('Create'), '$create_placeholder' => t('Calendar Name'), '$tools_label' => t('Calendar Tools'), - '$tools_options_label' => [t('Channel Calendar'), t('CalDAV Calendars')], + '$tools_options_label' => [t('Channel Calendars'), t('CalDAV Calendars')], '$import_label' => t('Import calendar'), '$import_placeholder' => t('Select a calendar to import to'), '$upload' => t('Upload'), -- cgit v1.2.3