2011-08-23 20:02:36 +04:00
|
|
|
<div id="choosecalendar_dialog" title="<?php echo $l->t("Choose active calendars"); ?>">
|
2012-02-05 00:23:31 +04:00
|
|
|
<p><b><?php echo $l->t('Your calendars'); ?>:</b></p>
|
2011-08-28 22:13:40 +04:00
|
|
|
<table width="100%" style="border: 0;">
|
2011-08-23 20:02:36 +04:00
|
|
|
<?php
|
2012-05-01 20:50:31 +04:00
|
|
|
$option_calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
|
2011-08-23 20:02:36 +04:00
|
|
|
for($i = 0; $i < count($option_calendars); $i++){
|
2011-08-28 22:13:40 +04:00
|
|
|
echo "<tr>";
|
2011-08-31 22:20:46 +04:00
|
|
|
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
|
|
|
|
$tmpl->assign('calendar', $option_calendars[$i]);
|
2012-04-22 00:27:19 +04:00
|
|
|
if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){
|
|
|
|
$shared = false;
|
|
|
|
}else{
|
|
|
|
$shared = true;
|
|
|
|
}
|
|
|
|
$tmpl->assign('shared', $shared);
|
2011-08-31 22:20:46 +04:00
|
|
|
$tmpl->printpage();
|
2011-08-28 22:13:40 +04:00
|
|
|
echo "</tr>";
|
2011-08-23 20:02:36 +04:00
|
|
|
}
|
|
|
|
?>
|
2011-09-08 14:29:29 +04:00
|
|
|
<tr>
|
2011-09-30 00:15:42 +04:00
|
|
|
<td colspan="6">
|
2012-01-17 22:09:11 +04:00
|
|
|
<a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="<?php echo $l->t('New Calendar') ?>"></a>
|
2011-09-08 14:29:29 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2011-09-09 20:44:33 +04:00
|
|
|
<tr>
|
2011-09-30 00:15:42 +04:00
|
|
|
<td colspan="6">
|
2012-04-18 13:50:12 +04:00
|
|
|
<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>
|
2011-09-09 20:44:33 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2012-02-05 00:23:31 +04:00
|
|
|
</table><br>
|
|
|
|
<p><b><?php echo $l->t('Shared calendars'); ?>: </b></p>
|
|
|
|
<table width="100%" style="border: 0;">
|
|
|
|
<?php
|
2012-05-01 20:50:31 +04:00
|
|
|
$share = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR);
|
2012-02-05 00:23:31 +04:00
|
|
|
$count = count($share);
|
|
|
|
for($i = 0; $i < $count; $i++){
|
2012-04-18 13:50:12 +04:00
|
|
|
$share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false);
|
2012-02-05 00:23:31 +04:00
|
|
|
echo '<tr>';
|
|
|
|
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields.shared');
|
|
|
|
$tmpl->assign('share', $share[$i]);
|
|
|
|
$tmpl->printpage();
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
?>
|
2011-08-28 22:13:40 +04:00
|
|
|
</table>
|
2012-02-05 00:23:31 +04:00
|
|
|
<?php
|
|
|
|
if($count == 0){
|
|
|
|
echo '<p style="text-align:center;"><b>' . $l->t('No shared calendars') . '</b></p>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|