2011-09-12 19:28:28 +00:00
|
|
|
<?php
|
|
|
|
/*************************************************
|
|
|
|
* ownCloud - Tasks Plugin *
|
|
|
|
* *
|
|
|
|
* (c) Copyright 2011 Bart Visscher *
|
|
|
|
* This file is licensed under the Affero General *
|
|
|
|
* Public License version 3 or later. *
|
|
|
|
* See the COPYING-README file. *
|
|
|
|
*************************************************/
|
|
|
|
|
2012-05-04 15:19:25 +00:00
|
|
|
OCP\User::checkLoggedIn();
|
|
|
|
OCP\App::checkAppEnabled('tasks');
|
2011-09-12 19:28:28 +00:00
|
|
|
|
2012-05-04 15:19:25 +00:00
|
|
|
$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true);
|
2012-02-22 19:12:49 +00:00
|
|
|
if( count($calendars) == 0 ) {
|
2012-05-04 18:20:37 +00:00
|
|
|
header('Location: ' . OCP\Util::linkTo('calendar', 'index.php'));
|
2011-09-12 19:28:28 +00:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2012-05-04 15:19:25 +00:00
|
|
|
OCP\Util::addScript('3rdparty/timepicker', 'jquery.ui.timepicker');
|
|
|
|
OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker');
|
|
|
|
OCP\Util::addScript('tasks', 'tasks');
|
|
|
|
OCP\Util::addStyle('tasks', 'style');
|
|
|
|
OCP\Util::addScript('contacts','jquery.multi-autocomplete');
|
|
|
|
OCP\Util::addScript('','oc-vcategories');
|
|
|
|
OCP\App::setActiveNavigationEntry('tasks_index');
|
2011-12-09 20:41:21 +00:00
|
|
|
|
2012-04-14 12:55:37 +00:00
|
|
|
$categories = OC_Calendar_App::getCategoryOptions();
|
2011-12-09 20:41:21 +00:00
|
|
|
$l10n = new OC_L10N('tasks');
|
2012-02-22 19:11:38 +00:00
|
|
|
$priority_options = OC_Task_App::getPriorityOptions();
|
2012-05-06 21:00:36 +00:00
|
|
|
$output = new OCP\Template('tasks', 'tasks', 'user');
|
2011-12-09 20:41:21 +00:00
|
|
|
$output->assign('priority_options', $priority_options);
|
2012-04-14 12:55:37 +00:00
|
|
|
$output->assign('categories', $categories);
|
2011-09-12 19:28:28 +00:00
|
|
|
$output -> printPage();
|