summaryrefslogtreecommitdiffstats
path: root/apps/calendar
diff options
context:
space:
mode:
authorGeorg Ehrke <georg.stefan.germany@googlemail.com>2011-09-09 18:44:33 +0200
committerGeorg Ehrke <georg.stefan.germany@googlemail.com>2011-09-09 18:44:33 +0200
commitf031e308cd3d218307bade298e17e75dd1077500 (patch)
tree751e147b4f7fd901b758bcf997f9bd5edf7f4164 /apps/calendar
parente5e4277ff32e0b831ae60d6bd48d9384848988e2 (diff)
downloadnextcloud-server-f031e308cd3d218307bade298e17e75dd1077500.tar.gz
nextcloud-server-f031e308cd3d218307bade298e17e75dd1077500.zip
show caldav url in choose calendar dialog
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/templates/part.choosecalendar.php14
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.php2
2 files changed, 13 insertions, 3 deletions
diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php
index 07e7573a8ab..500e0a4ca21 100644
--- a/apps/calendar/templates/part.choosecalendar.php
+++ b/apps/calendar/templates/part.choosecalendar.php
@@ -15,10 +15,16 @@ for($i = 0; $i < count($option_calendars); $i++){
<a href="#" onclick="oc_cal_newcalendar(this);"><?php echo $l->t('New Calendar') ?></a>
</td>
</tr>
+<tr>
+ <td colspan="4">
+ <input style="display:none;width: 90%;margin: 0 auto;" type="text" id="caldav_url" onmouseover="document.getElementById('caldav_url').select();" title="<?php echo $l->t("CalDav Link"); ?>">
+ </td>
+</tr>
</table>
<script type="text/javascript">
+ var totalurl = "<?php echo ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/apps/calendar/caldav.php/calendars'; ?>";
$( "#choosecalendar_dialog" ).dialog({
- width : 500,
+ width : 600,
close : function() {
oc_cal_opendialog = 0;
var lastchild = document.getElementById("body-user").lastChild
@@ -28,4 +34,8 @@ for($i = 0; $i < count($option_calendars); $i++){
}
}
});
-</script>
+ function showcaldavurl(username, calname){
+ document.getElementById("caldav_url").value = totalurl + "/" + username + "/" + calname;
+ document.getElementById("caldav_url").style.display = "block";
+ }
+</script>
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index 52edda4e251..1e80125999e 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -1,4 +1,4 @@
<?php
echo "<td width=\"20px\"><input id=\"active_" . $_['calendar']["id"] . "\" type=\"checkbox\" onClick=\"oc_cal_calender_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 style=\"display: block; opacity: 0.214133;\" href=\"export.php?calid=" . $_['calendar']["id"] . "\" title=\"" . $l->t("Download") . "\" class=\"action\"><img src=\"/owncloud/core/img/actions/download.svg\"></a></td><td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"oc_cal_editcalendar(this, " . $_['calendar']["id"] . ");\"><img src=\"/owncloud/core/img/actions/rename.svg\"></a></td>";
+ echo "<td width=\"20px\"><a href=\"#\" onclick=\"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><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=\"oc_cal_editcalendar(this, " . $_['calendar']["id"] . ");\"><img class=\"svg action\" src=\"../../core/img/actions/rename.svg\"></a></td>";