summaryrefslogtreecommitdiffstats
path: root/apps/calendar/templates
diff options
context:
space:
mode:
Diffstat (limited to 'apps/calendar/templates')
-rw-r--r--apps/calendar/templates/part.choosecalendar.php28
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.php10
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.shared.php4
-rw-r--r--apps/calendar/templates/part.editevent.php4
-rw-r--r--apps/calendar/templates/part.eventform.php71
-rw-r--r--apps/calendar/templates/part.import.php4
-rw-r--r--apps/calendar/templates/part.showevent.php247
-rw-r--r--apps/calendar/templates/share.dropdown.php77
8 files changed, 416 insertions, 29 deletions
diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php
index 86f09d62076..4f6680bb497 100644
--- a/apps/calendar/templates/part.choosecalendar.php
+++ b/apps/calendar/templates/part.choosecalendar.php
@@ -1,4 +1,5 @@
<div id="choosecalendar_dialog" title="<?php echo $l->t("Choose active calendars"); ?>">
+<p><b><?php echo $l->t('Your calendars'); ?>:</b></p>
<table width="100%" style="border: 0;">
<?php
$option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
@@ -6,6 +7,12 @@ for($i = 0; $i < count($option_calendars); $i++){
echo "<tr>";
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $option_calendars[$i]);
+ if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){
+ $shared = false;
+ }else{
+ $shared = true;
+ }
+ $tmpl->assign('shared', $shared);
$tmpl->printpage();
echo "</tr>";
}
@@ -20,4 +27,25 @@ for($i = 0; $i < count($option_calendars); $i++){
<p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" onmouseover="$('#caldav_url').select();" title="<?php echo $l->t("CalDav Link"); ?>"><img id="caldav_url_close" style="height: 20px;vertical-align: middle;display: none;" src="../../core/img/actions/delete.svg" alt="close" onclick="$('#caldav_url').hide();$('#caldav_url_close').hide();"/></p>
</td>
</tr>
+</table><br>
+<p><b><?php echo $l->t('Shared calendars'); ?>: </b></p>
+<table width="100%" style="border: 0;">
+<?php
+$share = OC_Calendar_Share::allSharedwithuser(OC_User::getUser(), OC_Calendar_Share::CALENDAR);
+$count = count($share);
+for($i = 0; $i < $count; $i++){
+ $share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false);
+ echo '<tr>';
+ $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields.shared');
+ $tmpl->assign('share', $share[$i]);
+ $tmpl->printpage();
+ echo '</tr>';
+}
+?>
</table>
+<?php
+if($count == 0){
+ echo '<p style="text-align:center;"><b>' . $l->t('No shared calendars') . '</b></p>';
+}
+?>
+</div> \ No newline at end of file
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index d3bf6c0501c..cf85f0dc53e 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -1,4 +1,8 @@
<?php
- echo "<td width=\"20px\"><input id=\"active_" . $_['calendar']["id"] . "\" type=\"checkbox\" onClick=\"Calendar.UI.Calendar.activation(this, " . $_['calendar']["id"] . ")\"" . ($_['calendar']["active"] ? ' checked="checked"' : '') . "></td>";
- echo "<td><label for=\"active_" . $_['calendar']["id"] . "\">" . $_['calendar']["displayname"] . "</label></td>";
- echo "<td width=\"20px\"><a href=\"#\" onclick=\"Calendar.UI.showCalDAVUrl('" . OC_User::getUser() . "', '" . rawurlencode( $_['calendar']["uri"] ) . "');\" title=\"" . $l->t("CalDav Link") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/public.svg\"></a></td><td width=\"20px\"><a href=\"export.php?calid=" . $_['calendar']["id"] . "\" title=\"" . $l->t("Download") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/download.svg\"></a></td><td width=\"20px\"><a href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"Calendar.UI.Calendar.edit(this, " . $_['calendar']["id"] . ");\"><img class=\"svg action\" src=\"../../core/img/actions/rename.svg\"></a></td><td width=\"20px\"><a href=\"#\" onclick=\"Calendar.UI.Calendar.deleteCalendar('" . $_['calendar']["id"] . "');\" title=\"" . $l->t("Delete") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/delete.svg\"></a></td>";
+echo '<td width="20px"><input id="active_' . $_['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Calendar.activation(this,' . $_['calendar']['id'] . ')"' . ($_['calendar']['active'] ? ' checked="checked"' : '') . '></td>';
+echo '<td id="' . OC_User::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . $_['calendar']['displayname'] . '</label></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img class="svg action" src="' . ((!$_['shared']) ? '../../core/img/actions/share.svg' : '../../core/img/actions/shared.svg') . '"></a></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['uri'] . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img class="svg action" src="../../core/img/actions/public.svg"></a></td>';
+echo '<td width="20px"><a href="export.php?calid=' . $_['calendar']['id'] . '" title="' . $l->t('Download') . '" class="action"><img class="svg action" src="../../core/img/actions/download.svg"></a></td>';
+echo '<td width="20px"><a href="#" title="' . $l->t('Edit') . '" class="action" onclick="Calendar.UI.Calendar.edit(this, ' . $_['calendar']['id'] . ');"><img class="svg action" src="../../core/img/actions/rename.svg"></a></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.Calendar.deleteCalendar(\'' . $_['calendar']['id'] . '\');" title="' . $l->t('Delete') . '" class="action"><img class="svg action" src="../../core/img/actions/delete.svg"></a></td>'; \ No newline at end of file
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.shared.php b/apps/calendar/templates/part.choosecalendar.rowfields.shared.php
new file mode 100644
index 00000000000..a23266da0c3
--- /dev/null
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.shared.php
@@ -0,0 +1,4 @@
+<?php
+echo '<td width="20px"><input id="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Share.activation(this,\'' . $_['share']['owner'] . '\',' . $_['share']['calendar']['id'] . ')"' . ($_['share']['active'] ? ' checked="checked"' : '') . '></td>';
+echo '<td><label for="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '">' . $_['share']['calendar']['displayname'] . '</label></td>';
+echo '<td style="font-style: italic;">' . $l->t('shared with you by') . ' ' . $_['share']['owner'] . '</td>'; \ No newline at end of file
diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php
index 6e319e1b4e0..58314db1a6b 100644
--- a/apps/calendar/templates/part.editevent.php
+++ b/apps/calendar/templates/part.editevent.php
@@ -1,13 +1,13 @@
<div id="event" title="<?php echo $l->t("Edit an event");?>">
<form id="event_form">
- <input type="hidden" name="id" value="<?php echo $_['id'] ?>">
+ <input type="hidden" name="id" value="<?php echo $_['eventid'] ?>">
<input type="hidden" name="lastmodified" value="<?php echo $_['lastmodified'] ?>">
<?php echo $this->inc("part.eventform"); ?>
<div style="width: 100%;text-align: center;color: #FF1D1D;" id="errorbox"></div>
<span id="actions">
<input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="Calendar.UI.validateEventForm('ajax/event/edit.php');">
<input type="button" class="submit" style="float: left;" name="delete" value="<?php echo $l->t("Delete");?>" onclick="Calendar.UI.submitDeleteEventForm('ajax/event/delete.php');">
- <input type="button" class="submit" style="float: right;" name="export" value="<?php echo $l->t("Export");?>" onclick="window.location='export.php?eventid=<?php echo $_['id'] ?>';">
+ <input type="button" class="submit" style="float: right;" name="export" value="<?php echo $l->t("Export");?>" onclick="window.location='export.php?eventid=<?php echo $_['eventid'] ?>';">
</span>
</form>
</div>
diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php
index 3830c273a73..c63630a5a05 100644
--- a/apps/calendar/templates/part.eventform.php
+++ b/apps/calendar/templates/part.eventform.php
@@ -1,3 +1,19 @@
+<script type="text/javascript">
+<?php
+echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid = "' . $_['eventid'] . '";';
+?>
+</script>
+
+<ul>
+ <li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
+ <li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
+ <li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>
+ <?php if($_['access'] == 'owner') { ?>
+ <li><a href="#tabs-5"><?php echo $l->t('Share'); ?></a></li>
+ <?php } ?>
+</ul>
+<div id="tabs-1">
<table width="100%">
<tr>
<th width="75px"><?php echo $l->t("Title");?>:</th>
@@ -26,7 +42,7 @@
<?php } else { ?>
<th width="75px">&nbsp;</th>
<td>
- <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id'] ?>">
+ <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id']; ?>">
</td>
<?php } ?>
</tr>
@@ -59,7 +75,27 @@
</table>
<input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button">
<div id="advanced_options" style="display: none;">
- <table style="width:100%">
+ <hr>
+ <table>
+ <tr>
+ <th width="85px"><?php echo $l->t("Location");?>:</th>
+ <td>
+ <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>" maxlength="100" name="location" />
+ </td>
+ </tr>
+ </table>
+ <table>
+ <tr>
+ <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
+ <td>
+ <textarea style="width:350px;height: 150px;" placeholder="<?php echo $l->t("Description of the Event");?>" name="description"><?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+<div id="tabs-2">
+ <table style="width:100%">
<tr>
<th width="75px"><?php echo $l->t("Repeat");?>:</th>
<td>
@@ -112,7 +148,7 @@
<tr id="advanced_weekday" style="display:none;">
<th width="75px"></th>
<td id="weeklycheckbox">
- <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" title="<?php echo $l->t("Select weekdays") ?>">
+ <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php echo $l->t("Select weekdays") ?>">
<?php
if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
echo html_select_options($_['repeat_weekly_options'], $_['repeat_weekdays'], array('combine'=>true));
@@ -185,6 +221,7 @@
<td>
<select id="end" name="end">
<?php
+ if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
echo html_select_options($_['repeat_end_options'], $_['repeat_end']);
?>
</select>
@@ -203,23 +240,13 @@
</td>
</tr>
</table>
+ <?php echo $l->t('Summary'); ?>:<span id="repeatsummary"></span>
</div>
- <hr>
- <!-- support for attendees will be added in following versions -->
- <table>
- <tr>
- <th width="85px"><?php echo $l->t("Location");?>:</th>
- <td>
- <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>" maxlength="100" name="location" />
- </td>
- </tr>
- </table>
- <table>
- <tr>
- <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
- <td>
- <textarea style="width:350px;height: 150px;" placeholder="<?php echo $l->t("Description of the Event");?>" name="description"><?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
- </td>
- </tr>
- </table>
- </div>
+</div>
+<div id="tabs-3">//Alarm</div>
+<div id="tabs-4">//Attendees</div>
+<?php if($_['access'] == 'owner') { ?>
+<div id="tabs-5">
+ <?php echo $this->inc('share.dropdown'); ?>
+</div>
+<?php } ?>
diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php
index 8f46484b42b..90691a33e50 100644
--- a/apps/calendar/templates/part.import.php
+++ b/apps/calendar/templates/part.import.php
@@ -3,7 +3,7 @@
<input type="hidden" id="filename" value="<?php echo $_['filename'];?>">
<input type="hidden" id="path" value="<?php echo $_['path'];?>">
<input type="hidden" id="progressfile" value="<?php echo md5(session_id()) . '.txt';?>">
-<p style="text-align:center;"><b><?php echo $l->t('Please choose the calendar'); ?></b>
+<p style="text-align:center;"><b><?php echo $l->t('Please choose the calendar'); ?></b></p>
<select style="width:100%;" id="calendar" name="calendar">
<?php
$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
@@ -17,7 +17,7 @@ echo html_select_options($calendar_options, $calendar_options[0]['id'], array('v
<input type="button" value="<?php echo $l->t("Import");?>!" id="startimport">
</div>
<div id="progressbar_container" style="display: none">
-<p style="text-align:center;"><b><?php echo $l->t('Importing calendar'); ?></b>
+<p style="text-align:center;"><b><?php echo $l->t('Importing calendar'); ?></b></p>
<div id="progressbar"></div>
<div id="import_done" style="display: none;">
<p style="text-align:center;"><b><?php echo $l->t('Calendar imported successfully'); ?></b></p>
diff --git a/apps/calendar/templates/part.showevent.php b/apps/calendar/templates/part.showevent.php
new file mode 100644
index 00000000000..c0521830563
--- /dev/null
+++ b/apps/calendar/templates/part.showevent.php
@@ -0,0 +1,247 @@
+<div id="event" title="<?php echo $l->t("View an event");?>">
+<ul>
+ <li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
+ <li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
+ <li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>
+</ul>
+<div id="tabs-1">
+ <table width="100%">
+ <tr>
+ <th width="75px"><?php echo $l->t("Title");?>:</th>
+ <td>
+ <?php echo isset($_['title']) ? htmlspecialchars($_['title']) : '' ?>
+ </td>
+ </tr>
+ </table>
+ <table width="100%">
+ <tr>
+ <th width="75px"><?php echo $l->t("Category");?>:</th>
+ <td>
+ <?php
+ if(count($_['categories']) == 0){
+ echo $l->t('No categories selected');
+ }else{
+ echo '<select id="category" name="categories[]" multiple="multiple" title="' . $l->t("Select category") . '">';
+ echo html_select_options($_['categories'], $_['categories'], array('combine'=>true));
+ echo '</select>';
+ }
+ ?>
+ </td>
+ <th width="75px">&nbsp;&nbsp;&nbsp;<?php echo $l->t("Calendar");?>:</th>
+ <td>
+ <select name="calendar" disabled="disabled">
+ <option>
+ <?php
+ $calendar = OC_Calendar_App::getCalendar($_['calendar']);
+ echo $calendar['displayname'] . ' ' . $l->t('of') . ' ' . $calendar['userid'];
+ ?>
+ </option>
+
+ </select>
+ </td>
+ <th width="75px">&nbsp;</th>
+ <td>
+ <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id'] ?>">
+ </td>
+ </tr>
+ </table>
+ <hr>
+ <table width="100%">
+ <tr>
+ <th width="75px"></th>
+ <td>
+ <input onclick="Calendar.UI.lockTime();" type="checkbox"<?php if($_['allday']){echo 'checked="checked"';} ?> id="allday_checkbox" name="allday" disabled="disabled">
+ <?php echo $l->t("All Day Event");?>
+ </td>
+ </tr>
+ <tr>
+ <th width="75px"><?php echo $l->t("From");?>:</th>
+ <td>
+ <?php echo $_['startdate'];?>
+ &nbsp;&nbsp; <?php echo (!$_['allday'])?$l->t('at'):''; ?> &nbsp;&nbsp;
+ <?php echo $_['starttime'];?>
+ </td>
+ </tr>
+ <tr>
+ <th width="75px"><?php echo $l->t("To");?>:</th>
+ <td>
+ <?php echo $_['enddate'];?>
+ &nbsp;&nbsp; <?php echo (!$_['allday'])?$l->t('at'):''; ?> &nbsp;&nbsp;
+ <?php echo $_['endtime'];?>
+ </td>
+ </tr>
+ </table>
+ <input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button">
+ <div id="advanced_options" style="display: none;">
+ <hr>
+ <table>
+ <tr>
+ <th width="85px"><?php echo $l->t("Location");?>:</th>
+ <td>
+ <?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>
+ </td>
+ </tr>
+ </table>
+ <table>
+ <tr>
+ <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
+ <td>
+ <?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
+ </tr>
+ </table>
+ </div>
+ </div>
+<div id="tabs-2">
+ <table style="width:100%">
+ <tr>
+ <th width="75px"><?php echo $l->t("Repeat");?>:</th>
+ <td>
+ <select id="repeat" name="repeat">
+ <?php
+ echo html_select_options(array($_['repeat_options'][$_['repeat']]), $_['repeat']);
+ ?>
+ </select></td>
+ <td><input type="button" style="float:right;" class="submit" value="<?php echo $l->t("Advanced"); ?>" onclick="Calendar.UI.showadvancedoptionsforrepeating();" id="advanced_options_button"></td>
+ </tr>
+ </table>
+ <div id="advanced_options_repeating" style="display:none;">
+ <table style="width:100%">
+ <tr id="advanced_month" style="display:none;">
+ <th width="75px"></th>
+ <td>
+ <select id="advanced_month_select" name="advanced_month_select">
+ <?php
+ echo html_select_options(array($_['repeat_month_options'][$_['repeat_month']]), $_['repeat_month']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_year" style="display:none;">
+ <th width="75px"></th>
+ <td>
+ <select id="advanced_year_select" name="advanced_year_select">
+ <?php
+ echo html_select_options(array($_['repeat_year_options'][$_['repeat_year']]), $_['repeat_year']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_weekofmonth" style="display:none;">
+ <th width="75px"></th>
+ <td id="weekofmonthcheckbox">
+ <select id="weekofmonthoptions" name="weekofmonthoptions">
+ <?php
+ echo html_select_options(array($_['repeat_weekofmonth_options'][$_['repeat_weekofmonth']]), $_['repeat_weekofmonth']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_weekday" style="display:none;">
+ <th width="75px"></th>
+ <td id="weeklycheckbox">
+ <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php echo $l->t("Select weekdays") ?>">
+ <?php
+ if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
+ echo html_select_options(array($_['repeat_weekly_options'][$_['repeat_weekdays']]), $_['repeat_weekdays'], array('combine'=>true));
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_byyearday" style="display:none;">
+ <th width="75px"></th>
+ <td id="byyeardaycheckbox">
+ <select id="byyearday" name="byyearday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
+ <?php
+ if (!isset($_['repeat_byyearday'])) {$_['repeat_byyearday'] = array();}
+ echo html_select_options(array($_['repeat_byyearday_options'][$_['repeat_byyearday']]), $_['repeat_byyearday'], array('combine'=>true));
+ ?>
+ </select><?php echo $l->t('and the events day of year.'); ?>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_bymonthday" style="display:none;">
+ <th width="75px"></th>
+ <td id="bymonthdaycheckbox">
+ <select id="bymonthday" name="bymonthday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
+ <?php
+ if (!isset($_['repeat_bymonthday'])) {$_['repeat_bymonthday'] = array();}
+ echo html_select_options(array($_['repeat_bymonthday_options'][$_['repeat_bymonthday']]), $_['repeat_bymonthday'], array('combine'=>true));
+ ?>
+ </select><?php echo $l->t('and the events day of month.'); ?>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_bymonth" style="display:none;">
+ <th width="75px"></th>
+ <td id="bymonthcheckbox">
+ <select id="bymonth" name="bymonth[]" multiple="multiple" title="<?php echo $l->t("Select months") ?>">
+ <?php
+ if (!isset($_['repeat_bymonth'])) {$_['repeat_bymonth'] = array();}
+ echo html_select_options(array($_['repeat_bymonth_options'][$_['repeat_bymonth']]), $_['repeat_bymonth'], array('combine'=>true));
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_byweekno" style="display:none;">
+ <th width="75px"></th>
+ <td id="bymonthcheckbox">
+ <select id="byweekno" name="byweekno[]" multiple="multiple" title="<?php echo $l->t("Select weeks") ?>">
+ <?php
+ if (!isset($_['repeat_byweekno'])) {$_['repeat_byweekno'] = array();}
+ echo html_select_options(array($_['repeat_byweekno_options'][$_['repeat_byweekno']]), $_['repeat_byweekno'], array('combine'=>true));
+ ?>
+ </select><?php echo $l->t('and the events week of year.'); ?>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr>
+ <th width="75px"><?php echo $l->t('Interval'); ?>:</th>
+ <td>
+ <?php echo isset($_['repeat_interval']) ? $_['repeat_interval'] : '1'; ?>
+ </td>
+ </tr>
+ <tr>
+ <th width="75px"><?php echo $l->t('End'); ?>:</th>
+ <td>
+ <select id="end" name="end">
+ <?php
+ if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
+ echo html_select_options(array($_['repeat_end_options'][$_['repeat_end']]), $_['repeat_end']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th></th>
+ <td id="byoccurrences" style="display:none;">
+ <?php echo $_['repeat_count'] . ' ' . $l->t('occurrences'); ?>
+ </td>
+ </tr>
+ <tr>
+ <th></th>
+ <td id="bydate" style="display:none;">
+ <?php echo $_['repeat_date']; ?>
+ </td>
+ </tr>
+ </table>
+ <?php echo $l->t('Summary'); ?>:<span id="repeatsummary"></span>
+ </div>
+</div>
+<div id="tabs-3">//Alarm</div>
+<div id="tabs-4">//Attendees</div>
+
+</div> \ No newline at end of file
diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php
new file mode 100644
index 00000000000..71556a6a21c
--- /dev/null
+++ b/apps/calendar/templates/share.dropdown.php
@@ -0,0 +1,77 @@
+<?php
+if(array_key_exists('calid', $_)){
+ $id = $_['calid'];
+ $sharedelements = OC_Calendar_Share::allUsersSharedwith($_['calid'], OC_Calendar_Share::CALENDAR);
+}else{
+ $sharedelements = OC_Calendar_Share::allUsersSharedwith($_['eventid'], OC_Calendar_Share::EVENT);
+ $id = $_['eventid'];
+}
+$users = array();$groups = array();$public = array();
+foreach($sharedelements as $sharedelement){
+ if($sharedelement['sharetype'] == 'user'){
+ $users[] = $sharedelement;
+ }elseif($sharedelement['sharetype'] == 'group'){
+ $groups[] = $sharedelement;
+ }elseif($sharedelement['sharetype'] == 'public'){
+ $public = $sharedelement;
+ }
+}
+?>
+<strong><?php echo $l->t('Users');?>:</strong><br>
+<select id="share_user" title="<?php echo $l->t('select users');?>" data-placeholder="<?php echo $l->t('select users'); ?>">
+<option value=""></option>
+<?php
+$allocusers = OC_User::getUsers();
+$allusers = array();
+foreach($allocusers as $ocuser){
+ $allusers[$ocuser] = $ocuser;
+}
+unset($allusers[OC_User::getUser()]);
+$allusers = array_flip($allusers);
+echo html_select_options($allusers, array());
+?>
+</select><br>
+<ul id="sharewithuser_list">
+<?php foreach($users as $user): ?>
+ <li id="sharewithuser_<?php echo $user['share']; ?>"><input type="checkbox" width="12px" <?php echo ($user['permissions']?'checked="checked"':'')?> style="visibility:hidden;" title="<?php echo $l->t('Editable'); ?>"><?php echo $user['share']; ?><img src="<?php echo OC::$WEBROOT; ?>/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>
+ <script>
+ $('#sharewithuser_<?php echo $user['share']; ?> > img').click(function(){
+ $('#share_user option[value="<?php echo $user['share']; ?>"]').removeAttr('disabled');
+ Calendar.UI.Share.unshare(<?php echo $id; ?>, '<?php echo (array_key_exists('calid', $_)?'calendar':'event');?>', '<?php echo $user['share']; ?>', 'user');
+ $('#sharewithuser_<?php echo $user['share']; ?>').remove();
+ $("#share_user").trigger("liszt:updated");
+ });
+ $('#share_user option[value="<?php echo $user['share']; ?>"]').attr('disabled', 'disabled');
+ </script>
+<?php endforeach; ?>
+</ul>
+<strong><?php echo $l->t('Groups');?>:</strong><br>
+<select id="share_group" title="<?php echo $l->t('select groups');?>" data-placeholder="<?php echo $l->t('select groups'); ?>">
+<option value=""></option>
+<?php
+$allocgroups = OC_Group::getGroups();
+$allgroups = array();
+foreach($allocgroups as $ocgroup){
+ $allgroups[$ocgroup] = $ocgroup;
+}
+echo html_select_options($allgroups, array());
+?>
+</select><br>
+<ul id="sharewithgroup_list">
+<?php foreach($groups as $group): ?>
+ <li id="sharewithgroup_<?php echo $group['share']; ?>"><input type="checkbox" width="12px" <?php echo ($group['permissions']?'checked="checked"':'')?> style="visibility:hidden;" title="<?php echo $l->t('Editable'); ?>"><?php echo $group['share']; ?><img src="<?php echo OC::$WEBROOT; ?>/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>
+ <script>
+ $('#sharewithgroup_<?php echo $group['share']; ?> > img').click(function(){
+ $('#share_group option[value="<?php echo $group['share']; ?>"]').removeAttr('disabled');
+ Calendar.UI.Share.unshare(<?php echo $id; ?>, '<?php echo (array_key_exists('calid', $_)?'calendar':'event');?>, '<?php echo $group['share']; ?>', 'group'); ?>
+ $('#sharewithgroup_<?php echo $group['share']; ?>').remove();
+ $("#share_group").trigger("liszt:updated");
+ });
+ $('#share_group option[value="<?php echo $group['share']; ?>"]').attr('disabled', 'disabled');
+ </script>
+<?php endforeach; ?>
+</ul>
+<div id="public">
+ <input type="checkbox" id="publish" <?php echo ($public['share'])?'checked="checked"':'' ?>><label for="publish"><?php echo $l->t('make public'); ?></label><br>
+ <input type="text" id="public_token" value="<?php echo OC_Helper::linkToAbsolute('apps/calendar', 'share.php?t=' . $public['share'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
+</div> \ No newline at end of file