2011-09-12 23:28:28 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Init owncloud
|
2012-05-04 19:19:25 +04:00
|
|
|
OCP\JSON::checkLoggedIn();
|
|
|
|
OCP\JSON::checkAppEnabled('tasks');
|
2011-09-12 23:28:28 +04:00
|
|
|
|
|
|
|
$l10n = new OC_L10N('tasks');
|
|
|
|
|
|
|
|
$id = $_GET['id'];
|
|
|
|
$task = OC_Calendar_Object::find($id);
|
2011-12-10 00:41:21 +04:00
|
|
|
$details = OC_VObject::parse($task['calendardata']);
|
|
|
|
if (!$details){
|
2012-05-04 19:19:25 +04:00
|
|
|
OCP\JSON::error();
|
2011-12-10 00:41:21 +04:00
|
|
|
exit;
|
|
|
|
}
|
2011-09-14 00:44:15 +04:00
|
|
|
|
2012-02-22 23:11:38 +04:00
|
|
|
$priority_options = OC_Task_App::getPriorityOptions();
|
2012-05-07 01:00:36 +04:00
|
|
|
$tmpl = new OCP\Template('tasks','part.details');
|
2011-09-14 00:44:15 +04:00
|
|
|
$tmpl->assign('priority_options', $priority_options);
|
2011-12-10 00:41:21 +04:00
|
|
|
$tmpl->assign('details',$details->VTODO);
|
2011-09-12 23:28:28 +04:00
|
|
|
$tmpl->assign('id',$id);
|
|
|
|
$page = $tmpl->fetchPage();
|
|
|
|
|
2012-05-04 19:19:25 +04:00
|
|
|
OCP\JSON::success(array('data' => array( 'id' => $id, 'page' => $page )));
|