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();
145 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
151 $this->user_settings->getWeekStart())->
get() as $date)
156 if ($settings->getEnableGroupMilestones())
158 $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
159 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'seed',$date->get(
IL_CAL_DATE));
160 $this->tpl->setCurrentBlock(
"new_ms");
162 $this->tpl->setVariable(
'H_NEW_MS_ALT',$this->lng->txt(
'cal_new_ms'));
163 $this->tpl->setVariable(
'NEW_MS_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'addMilestone'));
164 $this->tpl->parseCurrentBlock();
167 $this->tpl->setCurrentBlock(
'month_col');
169 include_once(
'./Services/Calendar/classes/class.ilCalendarUtil.php');
172 $this->tpl->setVariable(
'TD_CLASS',
'caltoday');
174 #elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_DAY))
176 # $this->tpl->setVariable('TD_CLASS','calnow');
180 $this->tpl->setVariable(
'TD_CLASS',
'calstd');
184 $this->tpl->setVariable(
'TD_CLASS',
'calprev');
188 $this->tpl->setVariable(
'TD_CLASS',
'calnext');
196 $month_day =
'1 '.ilCalendarUtil::_numericMonthToString($month,
false);
203 $this->ctrl->clearParametersByClass(
'ilcalendardaygui');
204 $this->ctrl->setParameterByClass(
'ilcalendardaygui',
'seed',$date->get(
IL_CAL_DATE));
205 $this->tpl->setVariable(
'OPEN_DAY_VIEW',$this->ctrl->getLinkTargetByClass(
'ilcalendardaygui',
''));
206 $this->ctrl->clearParametersByClass(
'ilcalendardaygui');
208 $this->tpl->setVariable(
'MONTH_DAY',$month_day);
209 #$this->tpl->setVariable('NEW_SRC',ilUtil::getImagePath('new.gif','calendar'));
211 $this->tpl->setVariable(
'NEW_ALT',$this->lng->txt(
'cal_new_app'));
212 $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
213 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'seed',$date->get(
IL_CAL_DATE));
214 $this->tpl->setVariable(
'ADD_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'add'));
217 $this->tpl->parseCurrentBlock();
220 if($counter and !($counter % 7))
222 $this->tpl->setCurrentBlock(
'month_row');
223 $this->tpl->parseCurrentBlock();
238 foreach($this->scheduler->getByDay($date,$this->timezone) as $item)
240 $this->tpl->setCurrentBlock(
'panel_code');
241 $this->tpl->setVariable(
'NUM',$this->num_appointments);
242 $this->tpl->parseCurrentBlock();
245 if ($item[
'event']->isMilestone())
247 $this->tpl->setCurrentBlock(
'fullday_ms_icon');
248 $this->tpl->setVariable(
'ALT_FD_MS', $this->lng->txt(
"cal_milestone"));
250 $this->tpl->parseCurrentBlock();
253 $this->tpl->setCurrentBlock(
'il_event');
255 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentPanelGUI.php');
257 $this->tpl->setVariable(
'PANEL_NUM',$this->num_appointments);
260 $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
261 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$item[
'event']->getEntryId());
262 $this->tpl->setVariable(
'EVENT_EDIT_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
263 $this->tpl->setVariable(
'EVENT_NUM',$item[
'event']->getEntryId());
265 $compl = ($item[
'event']->isMilestone() && $item[
'event']->getCompletion() > 0)
266 ?
" (".$item[
'event']->getCompletion().
"%)"
269 if($item[
'event']->isFullDay())
271 $title = $item[
'event']->getPresentationTitle().$compl;
275 switch($this->user_settings->getTimeFormat())
287 $title .= (
' '.$item[
'event']->getPresentationTitle());
289 $this->tpl->setVariable(
'EVENT_TITLE',
$title);
290 $color = $this->app_colors->getColorByAppointment($item[
'event']->getEntryId());
291 $this->tpl->setVariable(
'EVENT_BGCOLOR',$color);
294 $this->tpl->parseCurrentBlock();
296 $this->num_appointments++;