]> source.dussan.org Git - nextcloud-server.git/commitdiff
Implemented Sabre iCalendar Export Plugin.
authorThomas Tanghus <thomas@tanghus.net>
Sun, 8 Jul 2012 14:58:17 +0000 (16:58 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Sun, 8 Jul 2012 14:58:17 +0000 (16:58 +0200)
apps/calendar/appinfo/remote.php
apps/calendar/settings.php
apps/calendar/templates/settings.php

index 7ab546245f6668271d9df31296f232dc0d556448..e8f9e80c7a83a52b6f937395410c8d30a9cd1dd9 100644 (file)
@@ -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();
index a18b1ca9f422fd3174f4f275448c77d6a30d687f..eaa20c6c9b4bf540ff83e6dc39a4addfc9f23cb1 100644 (file)
@@ -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');
 
index 6d018f151101c94485313ee23a461670841ea94c..28c357621a82f7ab218b0ada9fd2affb0f22b54c 100644 (file)
                <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>