2014-01-23 02:48:57 +00:00
|
|
|
<!-- BEGIN -->
|
2012-06-21 21:26:51 +00:00
|
|
|
<td width="20px">
|
2012-09-16 16:08:35 +00:00
|
|
|
<?php if($_['calendar']['userid'] == OCP\USER::getUser()) { ?>
|
2013-02-28 16:35:22 +00:00
|
|
|
<input type="checkbox" id="active_<?php p($_['calendar']['id']) ?>" class="activeCalendar" data-id="<?php p($_['calendar']['id']) ?>" <?php print_unescaped($_['calendar']['active'] ? ' checked="checked"' : '') ?>>
|
2012-09-16 16:08:35 +00:00
|
|
|
<?php } ?>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
2013-02-28 16:21:45 +00:00
|
|
|
<td id="<?php p(OCP\USER::getUser()) ?>_<?php p($_['calendar']['id']) ?>">
|
|
|
|
<label for="active_<?php p($_['calendar']['id']) ?>"><?php p($_['calendar']['displayname']) ?></label>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
|
|
|
<td width="20px">
|
2014-01-23 02:48:57 +00:00
|
|
|
<?php if($_['calendar']['permissions'] & OCP\PERMISSION_SHARE): ?>
|
|
|
|
<label
|
|
|
|
for="outer-share-link-calendar-<?php p($_['calendar']['id']) ?>"
|
|
|
|
title="<?php p($l->t('Share Calendar')) ?>"
|
|
|
|
class="action permanent"
|
2014-01-25 19:27:16 +00:00
|
|
|
data-tooltip="<?php p($l->t('Share Calendar')) ?>"
|
2014-01-25 19:53:25 +00:00
|
|
|
style="cursor: pointer;"><img class="svg" src="<?php print_unescaped($_['share_icon']); ?>"/></label>
|
2014-01-23 02:48:57 +00:00
|
|
|
<?php endif; ?>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
|
|
|
<td width="20px">
|
2012-09-30 09:49:34 +00:00
|
|
|
<?php
|
2014-01-24 02:50:45 +00:00
|
|
|
// this can be changed to use $_['shared_by'] TODO
|
2012-09-30 09:49:34 +00:00
|
|
|
if($_['calendar']['userid'] == OCP\USER::getUser()){
|
|
|
|
$caldav = rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8'));
|
|
|
|
}else{
|
|
|
|
$caldav = rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8')) . '_shared_by_' . $_['calendar']['userid'];
|
|
|
|
}
|
|
|
|
?>
|
2014-01-25 19:27:16 +00:00
|
|
|
<a href="#" id="chooseCalendar-showCalDAVURL" data-user="<?php p(OCP\USER::getUser()) ?>" data-caldav="<?php p($caldav) ?>" title="<?php p($l->t('CalDav Link')) ?>" data-tooltip="<?php p($l->t('CalDav Link')) ?>" class="permanent"><img class="svg" src="<?php p(OCP\Util::imagePath('core', 'actions/public.svg')) ?>"></a>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
|
|
|
<td width="20px">
|
2014-01-25 19:27:16 +00:00
|
|
|
<a href="<?php print_unescaped(OCP\Util::linkTo('calendar', 'export.php') . '?calid=' . $_['calendar']['id']) ?>" title="<?php p($l->t('Download')) ?>" data-tooltip="<?php p($l->t('Download')) ?>"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/download.svg')) ?>"></a>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
|
|
|
<td width="20px">
|
2012-11-11 18:43:44 +00:00
|
|
|
<?php if($_['calendar']['permissions'] & OCP\PERMISSION_UPDATE) { ?>
|
2014-01-25 19:27:16 +00:00
|
|
|
<a href="#" id="chooseCalendar-edit" data-id="<?php p($_['calendar']['id']) ?>" title="<?php p($l->t('Edit')) ?>" data-tooltip="<?php p($l->t('Edit')) ?>"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/rename.svg')) ?>"></a>
|
2012-09-01 20:54:03 +00:00
|
|
|
<?php } ?>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
|
|
|
<td width="20px">
|
2012-11-11 18:43:44 +00:00
|
|
|
<?php if($_['calendar']['permissions'] & OCP\PERMISSION_DELETE) { ?>
|
2014-01-25 19:27:16 +00:00
|
|
|
<a href="#" id="chooseCalendar-delete" data-id="<?php p($_['calendar']['id']) ?>" title="<?php p($l->t('Delete')) ?>" data-tooltip="<?php p($l->t('Delete')) ?>"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/delete.svg')) ?>"></a>
|
2012-09-01 20:54:03 +00:00
|
|
|
<?php } ?>
|
2012-06-21 21:26:51 +00:00
|
|
|
</td>
|
2014-01-24 02:50:45 +00:00
|
|
|
<?php /* calendar sharing interface */ ?>
|
2014-01-23 02:48:57 +00:00
|
|
|
<?php if($_['calendar']['permissions'] & OCP\PERMISSION_SHARE): ?>
|
2014-01-23 14:19:08 +00:00
|
|
|
</tr><tr>
|
2014-01-23 02:48:57 +00:00
|
|
|
<th class="displayable-container" colspan="7">
|
|
|
|
<input type="checkbox" class="displayable-control hide" id="outer-share-link-calendar-<?php p($_['calendar']['id']) ?>"/>
|
2014-01-24 02:50:45 +00:00
|
|
|
<div class="displayable" style="padding-left:0.5em"><?php
|
|
|
|
/* internal calendar sharing interface */
|
|
|
|
$tmpl = new OCP\Template('calendar', 'part.internalshare');
|
|
|
|
$tmpl->assign('item_id', $_['calendar']['id']);
|
|
|
|
$tmpl->assign('item_type', 'calendar');
|
|
|
|
$tmpl->assign('permissions', $_['calendar']['permissions']);
|
|
|
|
$tmpl->assign('shared_with', $_['shared_with']);
|
|
|
|
$tmpl->printpage();
|
|
|
|
/* public calendar link-sharing interface */
|
2014-01-23 02:48:57 +00:00
|
|
|
$tmpl = new OCP\Template('calendar', 'part.linkshare');
|
|
|
|
$tmpl->assign('item_id', $_['calendar']['id']);
|
|
|
|
$tmpl->assign('item_type', 'calendar');
|
|
|
|
$tmpl->assign('permissions', $_['calendar']['permissions']);
|
2014-01-23 14:19:08 +00:00
|
|
|
$tmpl->assign('link_share', $_['link_share']);
|
2014-01-23 02:48:57 +00:00
|
|
|
$tmpl->printpage();
|
|
|
|
?></div>
|
2014-01-24 02:50:45 +00:00
|
|
|
</th>
|
|
|
|
<?php /* end calendar sharing interface */ ?>
|
2014-01-23 02:48:57 +00:00
|
|
|
<?php endif; ?>
|
|
|
|
<!-- END -->
|