Implemented Sabre iCalendar Export Plugin.

This commit is contained in:
Thomas Tanghus 2012-07-08 16:58:17 +02:00
parent f5c620006e
commit 3424785db0
3 changed files with 8 additions and 1 deletions

View 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();

View 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');

View File

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