24 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
62 $lng->loadLanguageModule(
"dateplaner");
63 include_once(
"./Services/News/classes/class.ilNewsItem.php");
75 $this->
setTitle($lng->txt(
"calendar"));
78 $this->allow_moving =
false;
81 include_once(
'Services/Calendar/classes/class.ilDate.php');
82 include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
84 $seed_str = (
$_GET[
"seed"] ==
"")
88 if (
$_GET[
"seed"] !=
"")
104 $tpl->addCSS(
"./Services/Calendar/css/calendar.css");
106 $tpl->addCSS(
"./Services/Calendar/templates/default/delos.css");
136 $cmd_class = $ilCtrl->getCmdClass();
138 if ($cmd_class ==
"ilcalendarappointmentgui" ||
139 $cmd_class ==
"ilcalendardaygui" ||
140 $cmd_class ==
"ilcalendarweekgui" ||
141 $cmd_class ==
"ilcalendarmonthgui" ||
142 $cmd_class ==
"ilcalendarinboxgui")
147 switch($ilCtrl->getCmd())
166 $next_class = $ilCtrl->getNextClass();
167 $cmd = $ilCtrl->getCmd(
"getHTML");
173 case "ilcalendarappointmentgui":
174 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
176 $ilCtrl->forwardCommand($app_gui);
179 case "ilcalendardaygui":
180 $ilTabs->setSubTabActive(
'app_day');
181 include_once(
'./Services/Calendar/classes/class.ilCalendarDayGUI.php');
183 $ilCtrl->forwardCommand($day_gui);
186 case "ilcalendarweekgui":
187 $ilTabs->setSubTabActive(
'app_week');
188 include_once(
'./Services/Calendar/classes/class.ilCalendarWeekGUI.php');
190 $ilCtrl->forwardCommand($week_gui);
193 case "ilcalendarmonthgui":
194 $ilTabs->setSubTabActive(
'app_month');
195 include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
197 $ilCtrl->forwardCommand($month_gui);
200 case "ilcalendarinboxgui":
201 include_once(
'./Services/Calendar/classes/class.ilCalendarInboxGUI.php');
203 $ilCtrl->forwardCommand($inbox);
207 return $this->
$cmd();
218 $this->enable_edit = $a_enable_edit;
228 return $this->enable_edit;
239 "Services/Calendar");
259 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
260 for($i = (
int) $this->user_settings->getWeekStart();$i < (7 + (int) $this->user_settings->getWeekStart());$i++)
262 $a_tpl->setCurrentBlock(
'month_header_col');
264 $a_tpl->parseCurrentBlock();
266 $a_tpl->setCurrentBlock(
'month_header_col');
267 $a_tpl->setVariable(
'TXT_WEEKDAY',
" ");
268 $a_tpl->parseCurrentBlock();
270 include_once(
'Services/Calendar/classes/class.ilCalendarSchedule.php');
272 $this->scheduler->addSubitemCalendars(
true);
273 $this->scheduler->calculate();
278 $this->user_settings->getWeekStart())->
get() as $date)
284 $a_tpl->setCurrentBlock(
'month_col');
286 if(count($this->scheduler->getByDay($date,$ilUser->getTimeZone())))
288 $a_tpl->setVariable(
'DAY_CLASS',
'calminiapp');
289 #$a_tpl->setVariable('TD_CLASS','calminiapp');
291 include_once(
'./Services/Calendar/classes/class.ilCalendarUtil.php');
294 $a_tpl->setVariable(
'TD_CLASS',
'calminitoday');
298 $a_tpl->setVariable(
'TD_CLASS',
'calmininow');
302 $a_tpl->setVariable(
'TD_CLASS',
'calministd');
306 $a_tpl->setVariable(
'TD_CLASS',
'calminiprev');
310 $a_tpl->setVariable(
'TD_CLASS',
'calmininext');
318 $ilCtrl->clearParametersByClass(
'ilcalendardaygui');
319 $ilCtrl->setParameterByClass(
'ilcalendardaygui',
'seed',$date->get(
IL_CAL_DATE));
320 $a_tpl->setVariable(
'OPEN_DAY_VIEW', $ilCtrl->getLinkTargetByClass(
'ilcalendardaygui',
''));
321 $ilCtrl->clearParametersByClass(
'ilcalendardaygui');
323 $a_tpl->setVariable(
'MONTH_DAY',$month_day);
331 $a_tpl->parseCurrentBlock();
333 if($counter and !($counter % 7))
335 $a_tpl->setCurrentBlock(
'month_row');
336 $ilCtrl->clearParametersByClass(
'ilcalendarweekgui');
337 $ilCtrl->setParameterByClass(
'ilcalendarweekgui',
'seed',$date->get(
IL_CAL_DATE));
338 $a_tpl->setVariable(
'OPEN_WEEK_VIEW', $ilCtrl->getLinkTargetByClass(
'ilcalendarweekgui',
''));
339 $ilCtrl->clearParametersByClass(
'ilcalendarweekgui');
340 $a_tpl->setVariable(
'TD_CLASS',
'calminiweek');
341 $a_tpl->setVariable(
'WEEK',
343 $a_tpl->parseCurrentBlock();
346 $a_tpl->setCurrentBlock(
'mini_month');
348 $a_tpl->setVariable(
'TXT_MONTH',
351 $myseed = clone($this->seed);
352 $ilCtrl->setParameterByClass(
'ilcalendarmonthgui',
'seed',$myseed->get(
IL_CAL_DATE));
353 $a_tpl->setVariable(
'OPEN_MONTH_VIEW',$ilCtrl->getLinkTargetByClass(
'ilcalendarmonthgui',
''));
356 $ilCtrl->setParameter($this,
'seed',$myseed->get(
IL_CAL_DATE));
359 $a_tpl->setVariable(
'BL_ID', $this->
getBlockId());
361 $a_tpl->setVariable(
'PREV_MONTH',
362 $ilCtrl->getLinkTarget($this,
"setSeed"));
363 $a_tpl->setVariable(
'PREV_MONTH_ASYNC',
364 $ilCtrl->getLinkTarget($this,
"setSeed",
"",
true));
367 $ilCtrl->setParameter($this,
'seed',$myseed->get(
IL_CAL_DATE));
368 $a_tpl->setVariable(
'NEXT_MONTH',
369 $ilCtrl->getLinkTarget($this,
"setSeed"));
370 $a_tpl->setVariable(
'NEXT_MONTH_ASYNC',
371 $ilCtrl->getLinkTarget($this,
"setSeed",
"",
true));
373 $ilCtrl->setParameter($this,
'seed',
"");
374 $a_tpl->parseCurrentBlock();
392 $ilCtrl->setParameter($this,
"add_mode",
"block");
394 $ilCtrl->getLinkTargetByClass(
"ilCalendarAppointmentGUI",
397 $ilCtrl->setParameter($this,
"add_mode",
"");
403 $ilCtrl->getLinkTarget($this,
"editSettings"),
404 $lng->txt(
"settings"));
407 $ilCtrl->setParameterByClass(
"ilcolumngui",
"seed",
$_GET[
"seed"]);
409 $ilCtrl->setParameterByClass(
"ilcolumngui",
"seed",
"");
430 include_once(
'./Services/Calendar/classes/class.ilCalendarSchedule.php');
432 $events = $schedule->getChangedEvents(
true);
434 $link =
'<a href='.$ilCtrl->getLinkTargetByClass(
'ilcalendarinboxgui',
'').
'>';
435 $text =
'<div class="small">'.((int) count($events)).
" ".$lng->txt(
"cal_changed_events_header").
"</div>";
438 return $link.$text.$end_link;
445 $a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
446 $lng->txt(
"close"),
true);
459 if(!is_object($this->categories))
461 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
464 (
int)
$_GET[
'ref_id']);
477 $ilTabs->clearSubTabs();
484 $ilTabs->addSubTabTarget(
'app_day',$this->ctrl->getLinkTargetByClass(
'ilCalendarDayGUI',
''));
485 $ilTabs->addSubTabTarget(
'app_week',$this->ctrl->getLinkTargetByClass(
'ilCalendarWeekGUI',
''));
486 $ilTabs->addSubTabTarget(
'app_month',$this->ctrl->getLinkTargetByClass(
'ilCalendarMonthGUI',
''));
501 if ($ilCtrl->isAsynch())
519 $ilCtrl->returnToParent($this);