blob: 34ddaa7791a24dcd7df8bcd613a5c34dcb88736f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
// Init owncloud
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('tasks');
$l10n = new OC_L10N('tasks');
$id = $_GET['id'];
$task = OC_Calendar_Object::find($id);
$details = OC_VObject::parse($task['calendardata']);
if (!$details){
OCP\JSON::error();
exit;
}
$priority_options = OC_Task_App::getPriorityOptions();
$tmpl = new OC_Template('tasks','part.details');
$tmpl->assign('priority_options', $priority_options);
$tmpl->assign('details',$details->VTODO);
$tmpl->assign('id',$id);
$page = $tmpl->fetchPage();
OCP\JSON::success(array('data' => array( 'id' => $id, 'page' => $page )));
|