summaryrefslogtreecommitdiffstats
path: root/apps/calendar
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-07-08 16:58:17 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-07-08 16:58:17 +0200
commit3424785db0b9396a950083d90dc6d5cf3133b512 (patch)
tree9f1b178c9b3186e38de3ae7d5284ca4e948ab89d /apps/calendar
parentf5c620006ebdaf65ced253f88bb85fc1ca671e3b (diff)
downloadnextcloud-server-3424785db0b9396a950083d90dc6d5cf3133b512.tar.gz
nextcloud-server-3424785db0b9396a950083d90dc6d5cf3133b512.zip
Implemented Sabre iCalendar Export Plugin.
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/appinfo/remote.php2
-rw-r--r--apps/calendar/settings.php1
-rw-r--r--apps/calendar/templates/settings.php6
3 files changed, 8 insertions, 1 deletions
diff --git a/apps/calendar/appinfo/remote.php b/apps/calendar/appinfo/remote.php
index 7ab546245f6..e8f9e80c7a8 100644
--- a/apps/calendar/appinfo/remote.php
+++ b/apps/calendar/appinfo/remote.php
@@ -34,6 +34,6 @@ $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
$server->addPlugin(new Sabre_CalDAV_Plugin());
$server->addPlugin(new Sabre_DAVACL_Plugin());
$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
-
+$server->addPlugin(new Sabre_CalDAV_ICSExportPlugin());
// And off we go!
$server->exec();
diff --git a/apps/calendar/settings.php b/apps/calendar/settings.php
index a18b1ca9f42..eaa20c6c9b4 100644
--- a/apps/calendar/settings.php
+++ b/apps/calendar/settings.php
@@ -10,6 +10,7 @@ $tmpl = new OCP\Template( 'calendar', 'settings');
$timezone=OCP\Config::getUserValue(OCP\USER::getUser(),'calendar','timezone','');
$tmpl->assign('timezone',$timezone);
$tmpl->assign('timezones',DateTimeZone::listIdentifiers());
+$tmpl->assign('calendars', OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()), false);
OCP\Util::addscript('calendar','settings');
diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php
index 6d018f15110..28c357621a8 100644
--- a/apps/calendar/templates/settings.php
+++ b/apps/calendar/templates/settings.php
@@ -56,6 +56,12 @@
<dd><code><?php echo OCP\Util::linkToRemote('caldav'); ?></code></dd>
<dt><?php echo $l->t('iOS/OS X'); ?></dt>
<dd><code><?php echo OCP\Util::linkToRemote('caldav'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd>
+ <dt><?php echo $l->t('Read only iCalendar link(s)'); ?></dt>
+ <dd>
+ <?php foreach($_['calendars'] as $calendar) { ?>
+ <a href="<?php echo OCP\Util::linkToRemote('caldav').'calendars/'.OCP\USER::getUser().'/'.rawurlencode($calendar['uri']) ?>?export"><?php echo $calendar['displayname'] ?></a><br />
+ <?php } ?>
+ </dd>
</dl>
</fieldset>
</form>