parent
c8a544eaea
commit
2815db2b07
@ -0,0 +1,29 @@ |
||||
<?php |
||||
/************************************************* |
||||
* ownCloud - Calendar Plugin * |
||||
* * |
||||
* (c) Copyright 2011 Georg Ehrke * |
||||
* author: Georg Ehrke * |
||||
* email: ownclouddev at georgswebsite dot de * |
||||
* homepage: ownclouddev.georgswebsite.de * |
||||
* manual: ownclouddev.georgswebsite.de/manual * |
||||
* License: GNU AFFERO GENERAL PUBLIC LICENSE * |
||||
* * |
||||
* If you are not able to view the License, * |
||||
* <http://www.gnu.org/licenses/> * |
||||
* <http://ownclouddev.georgswebsite.de/license/> * |
||||
* please write to the Free Software Foundation. * |
||||
* Address: * |
||||
* 59 Temple Place, Suite 330, Boston, * |
||||
* MA 02111-1307 USA * |
||||
*************************************************/ |
||||
require_once('../../../lib/base.php'); |
||||
$l10n = new OC_L10N('calendar'); |
||||
if(!OC_USER::isLoggedIn()) { |
||||
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>"); |
||||
} |
||||
$calendar = OC_Calendar_Calendar::findCalendar($_GET['calendarid']); |
||||
$tmpl = new OC_Template("calendar", "part.editcalendar"); |
||||
$tmpl->assign('calendar',$calendar); |
||||
$tmpl->printPage(); |
||||
?> |
||||
@ -0,0 +1,39 @@ |
||||
<?php |
||||
/************************************************* |
||||
* ownCloud - Calendar Plugin * |
||||
* * |
||||
* (c) Copyright 2011 Georg Ehrke * |
||||
* author: Georg Ehrke * |
||||
* email: ownclouddev at georgswebsite dot de * |
||||
* homepage: ownclouddev.georgswebsite.de * |
||||
* manual: ownclouddev.georgswebsite.de/manual * |
||||
* License: GNU AFFERO GENERAL PUBLIC LICENSE * |
||||
* * |
||||
* If you are not able to view the License, * |
||||
* <http://www.gnu.org/licenses/> * |
||||
* <http://ownclouddev.georgswebsite.de/license/> * |
||||
* please write to the Free Software Foundation. * |
||||
* Address: * |
||||
* 59 Temple Place, Suite 330, Boston, * |
||||
* MA 02111-1307 USA * |
||||
*************************************************/ |
||||
require_once('../../../lib/base.php'); |
||||
|
||||
$l10n = new OC_L10N('calendar'); |
||||
|
||||
// We send json data |
||||
header( "Content-Type: application/jsonrequest" ); |
||||
|
||||
// Check if we are a user |
||||
if( !OC_User::isLoggedIn()){ |
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Authentication error") ))); |
||||
exit(); |
||||
} |
||||
|
||||
$calendarid = $_POST['id']; |
||||
OC_Calendar_Calendar::editCalendar($calendarid, $_POST['name'], $_POST['description'], null, null, null, $_POST['color']); |
||||
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']); |
||||
$calendar = OC_Calendar_Calendar::findCalendar($calendarid); |
||||
$tmpl = new OC_Template('calendar', 'part.calendar.row'); |
||||
$tmpl->assign('calendar', $calendar); |
||||
echo json_encode( array( "status" => "success", "data" => $tmpl->fetchPage() )); |
||||
@ -0,0 +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=\"#\" 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>"; |
||||
@ -0,0 +1,32 @@ |
||||
<td id="editcalendar_dialog" title="<?php echo $l->t("Edit calendar"); ?>" colspan="4">
|
||||
<table width="100%" style="border: 0;"> |
||||
<tr> |
||||
<th><?php echo $l->t('Displayname') ?></th>
|
||||
<td> |
||||
<input id="displayname_<?php echo $_['calendar']['id'] ?>" type="text" value="<?php echo $_['calendar']['displayname'] ?>">
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td></td> |
||||
<td> |
||||
<input id="active_<?php echo $_['calendar']['id'] ?>" type="checkbox"<?php echo ($_['calendar']['active'] ? ' checked="checked"' : '' ) ?>>
|
||||
<label for="active_<?php echo $_['calendar']['id'] ?>">
|
||||
<?php echo $l->t('Active') ?> |
||||
</label> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><?php echo $l->t('Description') ?></th>
|
||||
<td> |
||||
<textarea id="description_<?php echo $_['calendar']['id'] ?>"><?php echo $_['calendar']['description'] ?></textarea>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><?php echo $l->t('Calendar color') ?></th>
|
||||
<td> |
||||
<input id="calendarcolor_<?php echo $_['calendar']['id'] ?>" type="text" value="<?php echo $_['calendar']['calendarcolor'] ?>">
|
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<input style="float: left;" type="button" onclick="oc_cal_editcalendar_submit(this, <?php echo $_['calendar']['id'] ?>);" value="<?php echo $l->t("Submit"); ?>">
|
||||
</td> |
||||
Loading…
Reference in new issue