provide a .ics download link in collection view and document $c->get_includes_subcollections

This commit is contained in:
Florian Schlichting 2017-01-02 21:57:41 +01:00
parent 10ed3ffc84
commit adce3f48a9
2 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,14 @@ $c->pg_connect[] = "dbname=davical user=davical_app";
*/
// $c->system_name = "DAViCal CalDAV Server";
/**
* The CalDAV specification does not define GET on a collection, but typically this is
* used as a .ics download for the whole collection. This will also enable a download
* link in the web interface for calendars with entries.
* Default: false
*/
// $c->get_includes_subcollections = true;
/**
* If "hide_TODO" is true, then VTODO requested from someone other than the
* admin or owner of a calendar will not get an answer. Often these todo are

View File

@ -217,6 +217,11 @@ $value_dav_name = $c->base_url.'/caldav.php'. ( $editor->Available() ? '##dav_na
$prompt_load_file = translate('Load From File');
$prompt_displayname = translate('Displayname');
$prompt_entries = translate('Items in Collection');
if ( $entries > 0 && $editor->Value('is_calendar') && isset($c->get_includes_subcollections) && $c->get_includes_subcollections
&& ( bindec($permissions->priv) & privilege_to_bits( array('urn:ietf:params:xml:ns:caldav:read-free-busy','DAV::read')))) {
$entries = '<a href="' . $c->base_url . '/caldav.php' . substr($editor->Value('dav_name'), 0, -1) . '.ics" title="'
. translate('Download entire collection as .ics file') . '">' . $entries . '</a>';
}
$prompt_public = translate('Publicly Readable');
$prompt_calendar = translate('Is a Calendar');
$prompt_addressbook = translate('Is an Addressbook');