single event sharing implemented, and properly (with pure HTML/CSS transitions, and as little JS as practical at this time).

it should be possible to add a completely JS-less implementation easily later.
master
Michał 'rysiek' Woźniak 2014-01-20 02:06:09 +01:00
parent 807b848c66
commit 976a84f7df
9 changed files with 386 additions and 24 deletions

View File

@ -18,7 +18,7 @@ if(OCP\User::isLoggedIn()) {
// no, we do not.
} else {
// dow e have a token?
// do we have a token?
if (!\OC::$session->exists('public_link_token'))
// nope, bail out!
OCP\User::checkLoggedIn();
@ -79,6 +79,9 @@ if(OCP\User::isLoggedIn()) {
$id = $_POST['id'];
$data = OC_Calendar_App::getEventObject($id, false, false);
echo "<pre>";
var_dump($data);
echo "</pre>";
if(!$data) {
OCP\JSON::error(array('data' => array('message' => OC_Calendar_App::$l10n->t('Wrong calendar'))));

View File

@ -287,7 +287,7 @@ button.category{margin:0 3px;}
width:100%;
height:44px;
top:43px;
font-size:80%;
font-size:90%;
}
#linksharedinfo a {
@ -305,4 +305,31 @@ button.category{margin:0 3px;}
#linksharedinfo + #controls + #fullcalendar {
top:86px;
}
#event.event.link-shared {
max-width:30em;
margin:70px auto auto auto;
padding:0.5em 1em;
}
#event.event.link-shared table,
#event.event.link-shared table * {
white-space:normal;
}
#event.event.link-shared .title {
font-size:200%;
font-weight:bold;
}
#event.event.link-shared .categories {
font-weight:bold;
font-style:italic;
}
#event.event.link-shared .date,
#event.event.link-shared .location,
#event.event.link-shared .description {
font-weight: bold;
}

View File

@ -42,7 +42,7 @@ OCP\Util::addscript('','tags');
OCP\Util::addscript('calendar','on-event');
OCP\App::setActiveNavigationEntry('calendar_index');
$tmpl = new OCP\Template('calendar', 'calendar', 'user');
$tmpl->assign("allowShareWithLink", \OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
if(array_key_exists('showevent', $_GET)) {
$tmpl->assign('showevent', $_GET['showevent']);
}

View File

@ -971,4 +971,138 @@ $(document).ready(function(){
$('#linkText').val($('#linkText').val().replace('service=files', 'service=calendar'));
return r;
};
/* sharing/unsharing single events done right */
$('.share-link-container input[type="checkbox"].share-link').live('change', function(e){
// get the data
slcontainer = $(this).parents('.share-link-container')
itemType = slcontainer.attr('data-item-type')
itemSource = slcontainer.attr('data-item')
itemSourceName = slcontainer.attr('data-item-source-name')
// sharing?
if ($(this).is(':checked')) {
// share it!
// we're sharing the item for the first time, so no password, no expiration date for sure
OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.PERMISSION_READ, itemSourceName, function(data) {
console.log(data)
// update the data
$(slcontainer)
.find('.link-text')
.val(
window.location.protocol + '//' + location.host + OC.linkTo('', 'public.php') + '?service=calendar&t='+data.token
);
})
// nope, un-sharing!
} else {
OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function(data) {
console.log(data)
// clear data
$(slcontainer)
.find('.link-text, .share-link-password, .expire-date')
.val('')
// clear checkboxes
$(slcontainer)
.find('.password-protect, .expire')
.attr('checked', false)
});
}
})
/* setting the password */
$('.share-link-container input[type="password"].share-link-password').live('blur', function(e){
// get the data
slcontainer = $(this).parents('.share-link-container')
itemType = slcontainer.attr('data-item-type')
itemSource = slcontainer.attr('data-item')
itemSourceName = slcontainer.attr('data-item-source-name')
itemPassword = $(this).val()
// set the password!
OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, itemPassword, OC.PERMISSION_READ, itemSourceName, function(data) {
console.log(data)
$(slcontainer)
.find('input.share-link-password')
.attr('placeholder', 'Password protected')
.val('')
})
})
/* what about Enter and Escape keys? */
$('.share-link-container input[type="password"].share-link-password').live('keydown', function(e){
// Enter? submit!
if (e.which == 13) {
e.preventDefault();
$(this).blur()
return false;
}
// escape? ignore!
// if (e.which == 13) { TODO?
})
/* removing password */
$('.share-link-container input[type="checkbox"].password-protect').live('change', function(e){
// clear the data input
$(this)
.siblings('.displayable')
.children('input')
.attr('placeholder', 'Password')
.val('')
// get the data
slcontainer = $(this).parents('.share-link-container')
itemType = slcontainer.attr('data-item-type')
itemSource = slcontainer.attr('data-item')
itemSourceName = slcontainer.attr('data-item-source-name')
itemPassword = slcontainer.find('input.share-link-password').val()
// we only handle removal of password
if (!$(this).is(':checked')) {
OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, itemPassword, OC.PERMISSION_READ, itemSourceName, function(data) {
console.log(data)
});
}
})
/* setting the expiration date */
$('.share-link-container input[type="date"].expire-date').live('change', function(e){
// get the data
slcontainer = $(this).parents('.share-link-container')
itemType = slcontainer.attr('data-item-type')
itemSource = slcontainer.attr('data-item')
itemSourceName = slcontainer.attr('data-item-source-name')
itemPassword = slcontainer.find('input.share-link-password').val()
expiryDate = $(this).val()
// set the date!
$.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: expiryDate }, function(result) {
if (!result || result.status !== 'success') {
OC.dialogs.alert(t('core', 'Error setting expiration date'), t('core', 'Error'));
}
});
})
/* removing password */
$('.share-link-container input[type="checkbox"].password-protect').live('change', function(e){
// clear the data input
$(this)
.siblings('.displayable')
.children('input')
.val('')
// get the data
slcontainer = $(this).parents('.share-link-container')
itemType = slcontainer.attr('data-item-type')
itemSource = slcontainer.attr('data-item')
itemSourceName = slcontainer.attr('data-item-source-name')
itemPassword = slcontainer.find('input.share-link-password').val()
// we only handle removal of expiry date
if (!$(this).is(':checked')) {
$.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: '' }, function(result) {
if (!result || result.status !== 'success') {
OC.dialogs.alert(t('core', 'Error unsetting expiration date'), t('core', 'Error'));
}
});
}
})
});

View File

@ -8,6 +8,7 @@
*
* This class manages our app actions
*/
OC_Calendar_App::$l10n = OCP\Util::getL10N('calendar');
OC_Calendar_App::$tz = OC_Calendar_App::getTimezone();
class OC_Calendar_App{
@ -65,10 +66,15 @@ class OC_Calendar_App{
* @return mixed - bool / array
*/
public static function getEventObject($id, $security = true, $shared = false) {
if(! is_numeric($id)) {
return false;
}
$event = OC_Calendar_Object::find($id);
if($shared === true || $security === true) {
// link-shared event
if ( ($shared === true) && ($security === true) ) {
return $event;
} elseif($shared === true || $security === true) {
$permissions = self::getPermissions($id, self::EVENT);
OCP\Util::writeLog('contacts', __METHOD__.' id: '.$id.', permissions: '.$permissions, OCP\Util::DEBUG);
if(self::getPermissions($id, self::EVENT)) {
return $event;
}

View File

@ -109,19 +109,30 @@ if (isset($rootLinkItem)) {
// Download the item
if (isset($_GET['download'])) {
$calendar = OC_Calendar_App::getCalendar($rootLinkItem['item_source'], true, true);
if(!$calendar) {
OCP\Util::writeLog('calendar', __FILE__ . ' : ' . __METHOD__, OCP\Util::ERROR);
// calendar
if ($linkItem['item_type'] === 'calendar') {
OCP\Util::writeLog('calendar', __FILE__ . ' : ' . __METHOD__, OCP\Util::ERROR);
$data = OC_Calendar_App::getCalendar($rootLinkItem['item_source'], true, true);
$type = OC_Calendar_Export::CALENDAR;
// event
} else {
OCP\Util::writeLog('calendar', __FILE__ . ' : ' . __METHOD__, OCP\Util::ERROR);
$data = OC_Calendar_App::getEventObject($rootLinkItem['item_source'], true, true);
$type = OC_Calendar_Export::EVENT;
}
if(!$data) {
OCP\Util::writeLog('share', 'forbidden!', \OCP\Util::ERROR);
header('HTTP/1.0 403 Forbidden');
exit;
}
header('Content-Type: text/calendar');
header('Content-Disposition: inline; filename=' . str_replace(' ', '-', $calendar['displayname']) . '.ics');
echo OC_Calendar_Export::export($rootLinkItem['item_source'], OC_Calendar_Export::CALENDAR);
header('Content-Disposition: inline; filename=' . str_replace(' ', '-', $data['displayname']) . '.ics');
echo OC_Calendar_Export::export($rootLinkItem['item_source'], $type);
exit();
// Display the item
} else {
// Display the calendar
} elseif ($linkItem['item_type'] === 'calendar') {
OCP\Util::addscript('calendar/3rdparty/fullcalendar', 'fullcalendar');
OCP\Util::addStyle('calendar/3rdparty/fullcalendar', 'fullcalendar');
OCP\Util::addscript('3rdparty/timepicker', 'jquery.ui.timepicker');
@ -139,6 +150,21 @@ if (isset($rootLinkItem)) {
$tmpl->assign('link_shared_calendar_owner', $linkItem['uid_owner']);
$tmpl->assign('link_shared_calendar_url', $url);
$tmpl->printPage();
// Display the event
} elseif ($linkItem['item_type'] === 'event') {
//OCP\Util::addscript('calendar', 'calendar');
OCP\Util::addStyle('calendar', 'style');
//OCP\Util::addscript('', 'jquery.multiselect');
//OCP\Util::addStyle('', 'jquery.multiselect');
//OCP\Util::addscript('calendar','jquery.multi-autocomplete');
//OCP\Util::addscript('','tags');
//OCP\Util::addscript('calendar','on-event');
OCP\App::setActiveNavigationEntry('calendar_index');
$tmpl = new OCP\Template('calendar', 'event', 'user');
$tmpl->assign('link_shared_event', $linkItem);
$tmpl->assign('link_shared_event_url', $url);
$tmpl->printPage();
}
exit();
} else {

View File

@ -2,7 +2,7 @@
<div id="notification" style="display:none;"></div>
<?php if (isset($_['link_shared_calendar_name'])) { ?>
<div id="linksharedinfo">User <?php p($_['link_shared_calendar_owner'])?> shared &quot;<?php p($_['link_shared_calendar_name'])?>&quot; calendar with you; explore below or download using this link:<br/><a href="<?php p($_['link_shared_calendar_url'])?>"><?php p($_['link_shared_calendar_url'])?></a></div>
<div id="linksharedinfo">User <?php p($_['link_shared_calendar_owner'])?> shared &quot;<?php p($_['link_shared_calendar_name'])?>&quot; calendar with you; explore below or download using this link:<br/><a href="<?php p($_['link_shared_calendar_url'])?>&amp;download"><?php p($_['link_shared_calendar_url'])?>&amp;download</a></div>
<?php } ?>
<div id="controls">
<form id="view">
@ -11,10 +11,12 @@
<input type="button" value="<?php p($l->t('Month'));?>" id="onemonthview_radio"/>&nbsp;&nbsp;
<img id="loading" src="<?php print_unescaped(OCP\Util::imagePath('calendar', 'loading.gif')); ?>" />
</form>
<form id="choosecalendar">
<?php
// this is not needed when we're in a publicly link-shared calendar display
if (!array_key_exists('link_shared_calendar_name', $_)) { ?><form id="choosecalendar">
<!--<input type="button" id="today_input" value="<?php p($l->t("Today"));?>"/>-->
<button class="settings generalsettings" title="<?php p($l->t('Settings')); ?>"><img class="svg" src="<?php print_unescaped(OCP\Util::imagePath('core', 'actions/settings.svg')); ?>" alt="<?php p($l->t('Settings')); ?>" /></button>
</form>
</form><?php } ?>
<form id="datecontrol">
<input type="button" value="&nbsp;&lt;&nbsp;" id="datecontrol_left"/>
<input type="button" value="" id="datecontrol_date"/>
@ -25,4 +27,4 @@
<div id="fullcalendar"></div>
<div id="dialog_holder"></div>
<div id="appsettings" class="popup topright hidden"></div>
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="yes" />
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />

View File

@ -9,13 +9,23 @@ $dtend = isset($_['dtend']) ? $_['dtend'] : null;
$calsharees = array();
$eventsharees = array();
// "event is publicly shared via a link-shared calendar" flag
$linkSharedCalendar = false;
// "event is publicly link-shared itself" flag/data array
$linkShare = array();
$sharedwithByCalendar = OCP\Share::getItemShared('calendar', $calid);
$sharedwithByEvent = OCP\Share::getItemShared('event', $eventid);
if(is_array($sharedwithByCalendar)) {
foreach($sharedwithByCalendar as $share) {
if($share['share_type'] == OCP\Share::SHARE_TYPE_USER || $share['share_type'] == OCP\Share::SHARE_TYPE_GROUP) {
$calsharees[] = $share;
// public link-sharing
} elseif($share['share_type'] == OCP\Share::SHARE_TYPE_LINK) {
$linkSharedCalendar = true;
}
}
}
@ -23,9 +33,12 @@ if(is_array($sharedwithByEvent)) {
foreach($sharedwithByEvent as $share) {
if($share['share_type'] == OCP\Share::SHARE_TYPE_USER || $share['share_type'] == OCP\Share::SHARE_TYPE_GROUP) {
$eventsharees[] = $share;
} else {
$linkShare = $share;
}
}
}
?>
<input type="text" id="sharewith"
@ -63,7 +76,130 @@ if(is_array($sharedwithByEvent)) {
<br />
<input type="button" id="sendemailbutton" style="float:right;" class="submit" value="<?php p($l->t("Send Email")); ?>" data-eventid="<?php p($eventid);?>" data-location="<?php p($location);?>" data-description="<?php p($description);?>" data-dtstart="<?php p($dtstart);?>" data-dtend="<?php p($dtend);?>">
<br />
<!-- link-sharing an event -->
<!-- background-image: url(<?php print_unescaped((!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg')) ?>); -->
<style>
.share-link-container h3 {
font-weight:bold;
}
.share-link-container input[type="checkbox"] {
vertical-align:middle;
}
.share-link-container input[type="text"],
.share-link-container input[type="e-mail"],
.share-link-container input[type="password"],
.share-link-container input[type="submit"],
.share-link-container input[type="date"] {
color:#333;
font-family: "Lucida Grande", Arial, Verdana, sans-serif;
font-size: 1em;
box-sizing: content-box;
background: #fff;
cursor: text;
margin: .3em 0px;
padding: .6em .5em .4em;
border: 1px solid #ddd;
outline: none;
border-radius: 3px;
width:100%;
min-width:10em;
box-sizing:border-box;
}
.share-link-container input[type="submit"] {
cursor:pointer;
}
.share-link-container input:invalid {
background:#fee;
}
/* by default, in a .displayable-container do not display direct-descending .displayable */
.displayable-container > .displayable {
max-height:0px;
-moz-transition:max-height ease-out 0.5s, opacity ease-out 0.5s;
-webkit-transition:max-height ease-out 0.5s, opacity ease-out 0.5s;
transition:max-height ease-out 0.5s, opacity ease-out 0.5s;
overflow:hidden;
opacity:0.1;
}
/* a marker to end a given displayable */
.displayable-container > .displayable:last-child::after {
width:75%;
height:0px;
display:block;
content:" ";
margin:0.2em auto 0.5em auto;
border-top:solid 1px #ddd;
}
/* display the rest once the checkbox is :checked */
.displayable-container > .displayable-control:checked ~ .displayable {
max-height:500px;
opacity:1;
-moz-transition:max-height ease-in 1s, opacity ease-in 0.5s;
-webkit-transition:max-height ease-in 1s, opacity ease-in 0.5s;
transition:max-height ease-in 1s, opacity ease-in 0.5s;
}
/* e-mail form */
.e-mail-form-container {
display:flex;
flex-direction:row;
}
.e-mail-form-container > input {
flex:auto 1;
}
.e-mail-form-container > input[type="submit"] {
min-width:5em;
width:auto;
}
</style>
<noscript><style>
/* if JS is disabled, .share-link-form-submit will be available,
hence .share-link-e-mail-send is un-needed*/
.share-link-e-mail-send {
display:none;
}
</style></noscript>
<div class="share-link-container displayable-container"
data-item-type="event"
data-item="<?php p($_['eventid']); ?>"
data-possible-permissions="<?php p($_['permissions']) ?>"
data-link="true"
data-js-enabled="javascript:alert('test')">
<!-- the checkbox that enables and disables the whole thing -->
<form>
<h3><?php p($l->t('Share via link')); ?></h3>
<input type="checkbox" name="share-link" class="share-link displayable-control" value="0" id="share-link-event-<?php p($_['eventid']); ?>" <?php if (isset($linkShare['token'])): ?> checked="checked"<?php endif; ?>/>
<label for="share-link-event-<?php p($_['eventid']); ?>"><?php p($l->t('Share link')) ?></label>
<!-- this should be visible only when the share-link checkbox is :checked -->
<div class="share-link-enabled-container displayable">
<!-- link container, contains the share link (duh) -->
<input class="link-text" type="text" readonly="readonly" placeholder="<?php p($l->t('Sharing link will appear here')) ?>" value="<?php if ($linkShare['token']) { p(OCP\Util::linkToPublic('calendar') . '&t=' . $linkShare['token']); } ?>"/>
<!-- do we want the password shown? default: nope -->
<div class="password-protect-outer-container displayable-container">
<input type="checkbox" name="password-protect" class="password-protect displayable-control" value="0" id="password-protect-event-<?php p($_['eventid']); ?>" <?php if (isset($linkShare['share_with'])): ?> checked="checked"<?php endif; ?>/>
<label for="password-protect-event-<?php p($_['eventid']); ?>" class="password-protect-label"><?php p($l->t('Password protect')) ?></label>
<div class="password-container displayable">
<input class="share-link-password" type="password" placeholder="<?php if (isset($linkShare['share_with'])) { p($l->t('Password protected')); } else { p($l->t('Password')); } ?>" name="share-link-password"/>
</div>
</div>
<!-- do we want share expiration date? -->
<div class="expire-date-outer-container displayable-container">
<input type="checkbox" name="expire" class="expire displayable-control" value="0" id="expire-event-<?php p($_['eventid']); ?>" <?php if (isset($linkShare['expiration'])): ?> checked="checked"<?php endif; ?>/>
<label for="expire-event-<?php p($_['eventid']); ?>" class="expire-label"><?php p($l->t('Set expiration date')) ?></label>
<div class="expire-date-container displayable">
<input class="expire-date" type="date" placeholder="<?php p($l->t('Expiration date')) ?>" name="expire-date" value="<?php if (isset($linkShare['expiration'])) { p(substr($linkShare['expiration'], 0, 10)); } ?>"/>
</div>
</div>
<!-- link email form -->
<div class="e-mail-form-container">
<input class="share-link-e-mail-address" value="" placeholder="<?php p($l->t('Email link to person')) ?>" type="e-mail"/>
<!-- the send e-mail submit button (unneeded and invisible if JS is disabled) -->
<input class="share-link-e-mail-send" type="submit" value="<?php p($l->t('Send')) ?>"/>
</div>
<!-- the submit button (unneeded and invisible if JS is enabled) -->
<noscript><input class="share-link-form-submit" type="submit" value="<?php p($l->t('Submit link-sharing settings')) ?>"/></noscript>
</div>
</form>
</div>
<!-- end link-sharing an event -->
<br />
<strong><?php p($l->t('Shared via calendar')); ?></strong>
<ul class="sharedby calendarlist">
@ -91,6 +227,17 @@ if(is_array($sharedwithByEvent)) {
</span>
</li>
<?php endforeach; ?>
<?php if ($linkSharedCalendar): ?>
<li data-share-with=""
data-item=""
data-item-type="calendar"
data-link="true"
data-permissions=""
data-share-type=""
style="text-align:center;">
<em><strong><?php p($l->t('This event is publicly link-shared via the calendar.')); ?></strong></em>
</li>
<?php endif; ?>
</ul>
<?php if(!$calsharees) {
$nobody = $l->t('Not shared with anyone via calendar');

View File

@ -1,15 +1,20 @@
<div id="event" title="<?php p($l->t("View an event"));?>">
<?php if (isset($_['link_shared_event'])) { ?>
<div id="linksharedinfo">User <?php p($_['link_shared_event']['uid_owner'])?> shared &quot;<?php p($_['link_shared_event']['item_target'])?>&quot; event with you; explore below or download using this link:<br/><a href="<?php p($_['link_shared_calendar_url'])?>&amp;download"><?php p($_['link_shared_event_url'])?>&amp;download</a></div>
<?php } ?>
<div id="event" class="event <?php if(isset($_['link_shared_event'])): ?>link-shared<?php endif; ?>" title="<?php p($l->t("View an event"));?>">
<?php if (!isset($_['link_shared_event'])): ?>
<ul>
<li><a href="#tabs-1"><?php p($l->t('Eventinfo')); ?></a></li>
<li><a href="#tabs-2"><?php p($l->t('Repeating')); ?></a></li>
<!--<li><a href="#tabs-3"><?php p($l->t('Alarm')); ?></a></li>
<li><a href="#tabs-4"><?php p($l->t('Attendees')); ?></a></li>-->
</ul>
<?php endif; ?>
<div id="tabs-1">
<table width="100%">
<tr>
<th width="75px"><?php p($l->t("Title"));?>:</th>
<td>
<td class="title">
<?php p(isset($_['title']) ? $_['title'] : '') ?>
</td>
</tr>
@ -17,7 +22,7 @@
<table width="100%">
<tr>
<th width="75px"><?php p($l->t("Category"));?>:</th>
<td>
<td class="categories">
<?php
if(count($_['categories']) == 0 || $_['categories'] == '') {
p($l->t('No categories selected'));
@ -34,6 +39,7 @@
}
?>
</td>
<?php if(!isset($_['link_shared_event'])): ?>
<th width="75px">&nbsp;&nbsp;&nbsp;<?php p($l->t("Calendar"));?>:</th>
<td>
<?php
@ -45,7 +51,9 @@
<td>
<input type="hidden" name="calendar" value="<?php p($_['calendar_options'][0]['id']) ?>">
</td>
<?php endif; ?>
</tr>
<?php if(!isset($_['link_shared_event'])): ?>
<tr>
<th width="75px"><?php p($l->t("Access Class"));?>:</th>
<td>
@ -56,6 +64,7 @@
</select>
</td>
</tr>
<?php endif; ?>
</table>
<hr>
<table width="100%">
@ -68,7 +77,7 @@
</tr>
<tr>
<th width="75px"><?php p($l->t("From"));?>:</th>
<td>
<td class="date from">
<?php p($_['startdate']);?>
&nbsp;&nbsp; <?php p((!$_['allday'])?$l->t('at'):''); ?> &nbsp;&nbsp;
<?php p($_['starttime']);?>
@ -76,20 +85,24 @@
</tr>
<tr>
<th width="75px"><?php p($l->t("To"));?>:</th>
<td>
<td class="date from">
<?php p($_['enddate']);?>
&nbsp;&nbsp; <?php p((!$_['allday'])?$l->t('at'):''); ?> &nbsp;&nbsp;
<?php p($_['endtime']);?>
</td>
</tr>
</table>
<?php if(!isset($_['link_shared_event'])): ?>
<input type="button" class="submit" value="<?php p($l->t("Advanced options")); ?>" id="advanced_options_button">
<div id="advanced_options" style="display: none;">
<?php else: ?>
<div class="event-info">
<?php endif; ?>
<hr>
<table>
<tr>
<th width="85px"><?php p($l->t("Location"));?>:</th>
<td>
<td class="location">
<?php p(isset($_['location']) ? $_['location'] : '') ?>
</td>
</tr>
@ -97,7 +110,7 @@
<table>
<tr>
<th width="85px" style="vertical-align: top;"><?php p($l->t("Description"));?>:</th>
<td>
<td class="description">
<?php p(isset($_['description']) ? $_['description'] : '') ?></textarea>
</tr>
</table>
@ -113,10 +126,13 @@
print_unescaped(OCP\html_select_options(array($_['repeat_options'][$_['repeat']]), $_['repeat']));
?>
</select></td>
<?php if(!isset($_['link_shared_event'])): ?>
<td><input type="button" style="float:right;" class="submit" value="<?php p($l->t("Advanced")); ?>" id="advanced_options_button_repeat"></td>
<?php endif; ?>
</tr>
</table>
<div id="advanced_options_repeating" style="display:none;">
<?php if ($_['repeat'] !== 'doesnotrepeat'): ?>
<div id="advanced_options_repeating" <?php if(!isset($_['link_shared_event'])): ?> style="display:none;" <?php endif; ?>>
<table style="width:100%">
<tr id="advanced_month" style="display:none;">
<th width="75px"></th>
@ -250,6 +266,7 @@
</tr>
</table>
</div>
<?php endif; ?>
</div>
<!--<div id="tabs-3">//Alarm</div>
<div id="tabs-4">//Attendees</div>-->