2011-08-23 20:02:36 +04:00
|
|
|
<div id="choosecalendar_dialog" title="<?php echo $l->t("Choose active calendars"); ?>">
|
2011-08-28 22:13:40 +04:00
|
|
|
<table width="100%" style="border: 0;">
|
2011-08-23 20:02:36 +04:00
|
|
|
<?php
|
|
|
|
$option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
|
|
|
|
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]);
|
|
|
|
$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>
|
|
|
|
<td colspan="4">
|
2011-09-12 00:06:45 +04:00
|
|
|
<a href="#" onclick="Calendar.UI.Calendar.new(this);"><?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>
|
|
|
|
<td colspan="4">
|
2011-09-09 22:39:38 +04:00
|
|
|
<p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" onmouseover="document.getElementById('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="document.getElementById('caldav_url').style.display = 'none';document.getElementById('caldav_url_close').style.display = 'none';"/></p>
|
2011-09-09 20:44:33 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2011-08-28 22:13:40 +04:00
|
|
|
</table>
|
2011-08-23 20:02:36 +04:00
|
|
|
<script type="text/javascript">
|
2011-09-09 20:44:33 +04:00
|
|
|
var totalurl = "<?php echo ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/apps/calendar/caldav.php/calendars'; ?>";
|
|
|
|
function showcaldavurl(username, calname){
|
|
|
|
document.getElementById("caldav_url").value = totalurl + "/" + username + "/" + calname;
|
|
|
|
document.getElementById("caldav_url").style.display = "block";
|
2011-09-09 22:39:38 +04:00
|
|
|
document.getElementById("caldav_url_close").style.display = "block";
|
2011-09-09 20:44:33 +04:00
|
|
|
}
|
|
|
|
</script>
|