nextcloud/apps/tasks/ajax/getdetails.php

22 lines
612 B
PHP
Raw Normal View History

2011-09-12 23:28:28 +04:00
<?php
// Init owncloud
require_once('../../../lib/base.php');
2011-10-06 23:21:38 +04:00
OC_JSON::checkLoggedIn();
OC_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);
$details = Sabre_VObject_Reader::read($task['calendardata'])->VTODO;
2011-09-14 00:44:15 +04:00
$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
2011-09-12 23:28:28 +04:00
$tmpl = new OC_Template('tasks','part.details');
2011-09-14 00:44:15 +04:00
$tmpl->assign('priority_options', $priority_options);
2011-09-12 23:28:28 +04:00
$tmpl->assign('details',$details);
$tmpl->assign('id',$id);
$page = $tmpl->fetchPage();
2011-10-06 23:21:38 +04:00
OC_JSON::success(array('data' => array( 'id' => $id, 'page' => $page )));