ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
24 include_once('Services/Calendar/classes/class.ilDate.php');
25 include_once('Services/Calendar/classes/class.ilCalendarHeaderNavigationGUI.php');
26 include_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');
27 include_once('Services/Calendar/classes/class.ilCalendarAppointmentColors.php');
28 include_once('./Services/Calendar/classes/class.ilCalendarSchedule.php');
29 include_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 $ilCtrl,$tpl;
78 
79  $next_class = $ilCtrl->getNextClass();
80  switch ($next_class) {
81  case 'ilcalendarappointmentgui':
82  $this->ctrl->setReturn($this, '');
83  $this->tabs_gui->setSubTabActive($_SESSION['cal_last_tab']);
84 
85  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
86 
87  ilLoggerFactory::getRootLogger()->debug("****** inbox seed 0 " . $this->seed);
88 
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 $ilCtrl;
116 
117  $this->tpl = new ilTemplate('tpl.inbox.html', true, true, 'Services/Calendar');
118 
119  // agenda list
120  $cal_list = new ilCalendarAgendaListGUI($this->seed);
121  $html = $ilCtrl->getHTML($cal_list);
122  $this->tpl->setVariable('CHANGED_TABLE', $html);
123  }
124 }
Set timezone
$_SESSION["AccountId"]
$_GET["client_id"]
static _getInstanceByUserId($a_user_id)
get singleton instance
executeCommand()
Execute command.
user()
Definition: user.php:4
__construct(ilDate $seed_date)
Constructor.
global $ilCtrl
Definition: ilias.php:18
Class for single dates.
special template class to simplify handling of ITX/PEAR
Administrate calendar appointments.
$html
Definition: example_001.php:87
static getRootLogger()
The unique root logger has a fixed error level.