2011-09-12 23:28:28 +04: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. *
|
|
|
|
*************************************************/
|
|
|
|
|
|
|
|
require_once ('../../lib/base.php');
|
2011-10-06 23:21:38 +04:00
|
|
|
OC_Util::checkLoggedIn();
|
|
|
|
OC_Util::checkAppEnabled('tasks');
|
2011-09-12 23:28:28 +04:00
|
|
|
|
|
|
|
$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), true);
|
2012-02-22 23:12:49 +04:00
|
|
|
if( count($calendars) == 0 ) {
|
|
|
|
header('Location: ' . OC_Helper::linkTo('calendar', 'index.php'));
|
2011-09-12 23:28:28 +04:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2012-04-20 20:16:39 +04:00
|
|
|
OC_Util::addScript('3rdparty/timepicker', 'jquery.ui.timepicker');
|
|
|
|
OC_Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker');
|
2011-09-12 23:28:28 +04:00
|
|
|
OC_UTIL::addScript('tasks', 'tasks');
|
|
|
|
OC_UTIL::addStyle('tasks', 'style');
|
2012-04-14 16:55:37 +04:00
|
|
|
OC_Util::addScript('contacts','jquery.multi-autocomplete');
|
|
|
|
OC_Util::addScript('','oc-vcategories');
|
2011-09-12 23:28:28 +04:00
|
|
|
OC_APP::setActiveNavigationEntry('tasks_index');
|
2011-12-10 00:41:21 +04:00
|
|
|
|
2012-04-14 16:55:37 +04:00
|
|
|
$categories = OC_Calendar_App::getCategoryOptions();
|
2011-12-10 00:41:21 +04:00
|
|
|
$l10n = new OC_L10N('tasks');
|
2012-02-22 23:11:38 +04:00
|
|
|
$priority_options = OC_Task_App::getPriorityOptions();
|
2011-09-12 23:28:28 +04:00
|
|
|
$output = new OC_Template('tasks', 'tasks', 'user');
|
2011-12-10 00:41:21 +04:00
|
|
|
$output->assign('priority_options', $priority_options);
|
2012-04-14 16:55:37 +04:00
|
|
|
$output->assign('categories', $categories);
|
2011-09-12 23:28:28 +04:00
|
|
|
$output -> printPage();
|