ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 {
63 parent::__construct($seed_date, ilCalendarViewGUI::CAL_PRESENTATION_AGENDA_LIST);
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 $tpl->setContent($html);
98 break;
99
100 default:
101 $cmd = $this->ctrl->getCmd("inbox");
102 $this->$cmd();
103 $tpl->setContent($this->tpl->get());
104 break;
105 }
106
107 return true;
108 }
109
113 protected function inbox()
114 {
115 global $DIC;
116
117 $ilCtrl = $DIC['ilCtrl'];
118
119 $this->tpl = new ilTemplate('tpl.inbox.html', true, true, 'Services/Calendar');
120
121 // agenda list
122 $cal_list = new ilCalendarAgendaListGUI($this->seed);
123 $html = $ilCtrl->getHTML($cal_list);
124 $this->tpl->setVariable('CHANGED_TABLE', $html);
125 }
126}
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
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7