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
|
|
|
|
2012-05-04 19:19:25 +04:00
|
|
|
$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true);
|
2012-04-15 17:38:44 +04:00
|
|
|
$category_options = OC_Calendar_App::getCategoryOptions();
|
2012-03-09 01:26:54 +04:00
|
|
|
$percent_options = range(0, 100, 10);
|
|
|
|
$priority_options = OC_Task_App::getPriorityOptions();
|
2012-05-07 01:00:36 +04:00
|
|
|
$tmpl = new OCP\Template('tasks','part.addtaskform');
|
2011-09-12 23:28:28 +04:00
|
|
|
$tmpl->assign('calendars',$calendars);
|
2012-03-09 01:26:54 +04:00
|
|
|
$tmpl->assign('category_options', $category_options);
|
|
|
|
$tmpl->assign('percent_options', $percent_options);
|
|
|
|
$tmpl->assign('priority_options', $priority_options);
|
|
|
|
$tmpl->assign('details', new OC_VObject('VTODO'));
|
2012-04-14 16:55:37 +04:00
|
|
|
$tmpl->assign('categories', '');
|
2011-09-12 23:28:28 +04:00
|
|
|
$page = $tmpl->fetchPage();
|
|
|
|
|
2012-05-04 19:19:25 +04:00
|
|
|
OCP\JSON::success(array('data' => array( 'page' => $page )));
|