ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilCalendarInboxGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24include_once('Services/Calendar/classes/class.ilDate.php');
25include_once('Services/Calendar/classes/class.ilCalendarHeaderNavigationGUI.php');
26include_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');
27include_once('Services/Calendar/classes/class.ilCalendarAppointmentColors.php');
28include_once('./Services/Calendar/classes/class.ilCalendarSchedule.php');
29include_once './Services/Calendar/classes/class.ilCalendarViewGUI.php';
30
31
32
43{
44 protected $user_settings = null;
45
46 protected $lng;
47 protected $ctrl;
48 protected $tabs_gui;
49 protected $tpl;
50 protected $user;
51 protected $toolbar;
52 protected $timezone = 'UTC';
53
61 public function __construct(ilDate $seed_date)
62 {
64 $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
65 $this->app_colors = new ilCalendarAppointmentColors($this->user->getId());
66 $this->timezone = $this->user->getTimeZone();
67 }
68
75 public function executeCommand()
76 {
77 global $DIC;
78
79 $ilCtrl = $DIC['ilCtrl'];
80 $tpl = $DIC['tpl'];
81
82 $next_class = $ilCtrl->getNextClass();
83 switch ($next_class) {
84 case 'ilcalendarappointmentgui':
85 $this->ctrl->setReturn($this, '');
86 $this->tabs_gui->setSubTabActive($_SESSION['cal_last_tab']);
87
88 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
89 $app = new ilCalendarAppointmentGUI($this->seed, $this->seed, (int) $_GET['app_id']);
90 $this->ctrl->forwardCommand($app);
91 break;
92
93 case 'ilcalendaragendalistgui':
94 include_once("./Services/Calendar/classes/Agenda/class.ilCalendarAgendaListGUI.php");
95 $cal_list = new ilCalendarAgendaListGUI($this->seed);
96 $html = $this->ctrl->forwardCommand($cal_list);
97 // this fixes 0027035 since many methods ilCalendarAppointmentGUI set their own content.
98 if (strlen($html)) {
99 $tpl->setContent($html);
100 }
101 break;
102
103 default:
104 $cmd = $this->ctrl->getCmd("inbox");
105 $this->$cmd();
106 $tpl->setContent($this->tpl->get());
107 break;
108 }
109
110 return true;
111 }
112
116 protected function inbox()
117 {
118 global $DIC;
119
120 $ilCtrl = $DIC['ilCtrl'];
121
122 $this->tpl = new ilTemplate('tpl.inbox.html', true, true, 'Services/Calendar');
123
124 // agenda list
125 $cal_list = new ilCalendarAgendaListGUI($this->seed);
126 $html = $ilCtrl->getHTML($cal_list);
127 $this->tpl->setVariable('CHANGED_TABLE', $html);
128 }
129}
user()
Definition: user.php:4
$_GET["client_id"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
Administrate calendar appointments.
executeCommand()
Execute command.
__construct(ilDate $seed_date)
Constructor.
static _getInstanceByUserId($a_user_id)
get singleton instance
Class for single dates.
special template class to simplify handling of ITX/PEAR
$app
Definition: cli.php:38
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46