Blame view
sources/apps/tasks/index.php
1.29 KB
|
42e4f8d60
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
<?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. *
*************************************************/
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('tasks');
if (!OCP\App::isEnabled('calendar')) {
OCP\Template::printUserPage('tasks', 'no-calendar-app');
exit;
}
$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true);
if( count($calendars) == 0 ) {
header('Location: ' . OCP\Util::linkTo('calendar', 'index.php'));
exit;
}
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('calendar', 'jquery.multi-autocomplete');
OCP\Util::addScript('', 'tags');
OCP\App::setActiveNavigationEntry('tasks_index');
$priority_options = OC_Task_App::getPriorityOptions();
$output = new OCP\Template('tasks', 'tasks', 'user');
$output->assign('priority_options', $priority_options);
$output -> printPage();
|