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');
66 $this->seed = $seed_date;
71 $this->tabs_gui = $ilTabs;
72 $this->tabs_gui->setSubTabActive(
'app_month');
77 $this->timezone = $ilUser->getTimeZone();
90 $next_class = $ilCtrl->getNextClass();
93 case 'ilcalendarappointmentgui':
94 $this->ctrl->setReturn($this,
'');
95 $this->tabs_gui->setSubTabActive(
$_SESSION[
'cal_last_tab']);
97 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
99 $this->ctrl->forwardCommand($app);
103 $time = microtime(
true);
104 $cmd = $this->ctrl->getCmd(
"show");
106 $tpl->setContent($this->tpl->get());
108 #echo "Zeit: ".(microtime(true) - $time);
124 $this->tpl =
new ilTemplate(
'tpl.month_view.html',
true,
true,
'Services/Calendar');
126 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
131 $this->tpl->setVariable(
'NAVIGATION',$navigation->getHTML());
133 for($i = (
int) $this->user_settings->getWeekStart();$i < (7 + (int) $this->user_settings->getWeekStart());$i++)
135 $this->tpl->setCurrentBlock(
'month_header_col');
137 $this->tpl->parseCurrentBlock();
140 include_once(
'Services/Calendar/classes/class.ilCalendarSchedule.php');
142 $this->scheduler->addSubitemCalendars(
true);
143 $this->scheduler->calculate();
148 $this->user_settings->getWeekStart())->
get() as $date)
153 $this->tpl->setCurrentBlock(
'month_col');
155 include_once(
'./Services/Calendar/classes/class.ilCalendarUtil.php');
158 $this->tpl->setVariable(
'TD_CLASS',
'caltoday');
162 $this->tpl->setVariable(
'TD_CLASS',
'calnow');
166 $this->tpl->setVariable(
'TD_CLASS',
'calstd');
170 $this->tpl->setVariable(
'TD_CLASS',
'calprev');
174 $this->tpl->setVariable(
'TD_CLASS',
'calnext');
182 $month_day =
'1 '.ilCalendarUtil::_numericMonthToString($month,
false);
189 $this->ctrl->clearParametersByClass(
'ilcalendardaygui');
190 $this->ctrl->setParameterByClass(
'ilcalendardaygui',
'seed',$date->get(
IL_CAL_DATE));
191 $this->tpl->setVariable(
'OPEN_DAY_VIEW',$this->ctrl->getLinkTargetByClass(
'ilcalendardaygui',
''));
192 $this->ctrl->clearParametersByClass(
'ilcalendardaygui');
194 $this->tpl->setVariable(
'MONTH_DAY',$month_day);
195 #$this->tpl->setVariable('NEW_SRC',ilUtil::getImagePath('new.gif','calendar'));
197 $this->tpl->setVariable(
'NEW_ALT',$this->lng->txt(
'cal_new_app'));
198 $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
199 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'seed',$date->get(
IL_CAL_DATE));
200 $this->tpl->setVariable(
'ADD_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'add'));
203 $this->tpl->parseCurrentBlock();
206 if($counter and !($counter % 7))
208 $this->tpl->setCurrentBlock(
'month_row');
209 $this->tpl->parseCurrentBlock();
224 foreach($this->scheduler->getByDay($date,$this->timezone) as $item)
226 $this->tpl->setCurrentBlock(
'panel_code');
227 $this->tpl->setVariable(
'NUM',$this->num_appointments);
228 $this->tpl->parseCurrentBlock();
230 $this->tpl->setCurrentBlock(
'il_event');
232 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentPanelGUI.php');
234 $this->tpl->setVariable(
'PANEL_NUM',$this->num_appointments);
237 $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
238 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$item[
'event']->getEntryId());
239 $this->tpl->setVariable(
'EVENT_EDIT_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
240 $this->tpl->setVariable(
'EVENT_NUM',$item[
'event']->getEntryId());
242 if($item[
'event']->isFullDay())
244 $title = $item[
'event']->getPresentationTitle();
248 switch($this->user_settings->getTimeFormat())
260 $title .= (
' '.$item[
'event']->getPresentationTitle());
262 $this->tpl->setVariable(
'EVENT_TITLE',
$title);
263 $color = $this->app_colors->getColorByAppointment($item[
'event']->getEntryId());
264 $this->tpl->setVariable(
'EVENT_BGCOLOR',$color);
267 $this->tpl->parseCurrentBlock();
269 $this->num_appointments++;