24 include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettings.php');
56 $this->lng->loadLanguageModule(
'dateplaner');
68 $this->parentobject = $a_parentobject;
78 return $this->parentobject;
89 "tpl.calendar_block_frame.html",
96 "tpl.calendar_block.html",
103 $ftpl->setVariable(
"BLOCK_TITLE", $lng->txt(
"calendar"));
104 $ftpl->setVariable(
"CONTENT",
$tpl->get());
117 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
118 $a_tpl->setCurrentBlock(
'month_header_col');
119 $a_tpl->setVariable(
'TXT_WEEKDAY', $lng->txt(
"cal_week_abbrev"));
120 $a_tpl->parseCurrentBlock();
121 for (
$i = (
int) $this->user_settings->getWeekStart();
$i < (7 + (int) $this->user_settings->getWeekStart());
$i++) {
122 $a_tpl->setCurrentBlock(
'month_header_col');
124 $a_tpl->parseCurrentBlock();
127 include_once(
'Services/Calendar/classes/class.ilCalendarSchedule.php');
129 $this->scheduler->calculate();
135 $this->user_settings->getWeekStart()
141 $a_tpl->setCurrentBlock(
'month_col');
143 if (count($this->scheduler->getByDay($date, $ilUser->getTimeZone()))) {
144 $a_tpl->setVariable(
'DAY_CLASS',
'calminiapp');
145 #$a_tpl->setVariable('TD_CLASS','calminiapp'); 148 include_once(
'./Services/Calendar/classes/class.ilCalendarUtil.php');
150 $a_tpl->setVariable(
'TD_CLASS',
'calminitoday');
152 #elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_DAY)) 154 # $a_tpl->setVariable('TD_CLASS','calmininow'); 157 $a_tpl->setVariable(
'TD_CLASS',
'calministd');
159 $a_tpl->setVariable(
'TD_CLASS',
'calminiprev');
161 $a_tpl->setVariable(
'TD_CLASS',
'calmininext');
169 $ilCtrl->clearParametersByClass(
'ilcalendardaygui');
170 $ilCtrl->setParameterByClass(
'ilcalendardaygui',
'seed', $date->get(
IL_CAL_DATE));
171 $a_tpl->setVariable(
'OPEN_DAY_VIEW', $ilCtrl->getLinkTargetByClass(
'ilcalendardaygui',
''));
172 $ilCtrl->clearParametersByClass(
'ilcalendardaygui');
174 $a_tpl->setVariable(
'MONTH_DAY', $month_day);
175 $a_tpl->parseCurrentBlock();
178 $a_tpl->setCurrentBlock(
'week');
183 $a_tpl->parseCurrentBlock();
185 $a_tpl->setCurrentBlock(
'month_row');
186 $ilCtrl->clearParametersByClass(
'ilcalendarweekgui');
187 $ilCtrl->setParameterByClass(
'ilcalendarweekgui',
'seed', $date->get(
IL_CAL_DATE));
188 $ilCtrl->clearParametersByClass(
'ilcalendarweekgui');
189 $a_tpl->setVariable(
'TD_CLASS',
'calminiweek');
190 $a_tpl->parseCurrentBlock();
193 $a_tpl->setCurrentBlock(
'mini_month');
194 $a_tpl->setVariable(
'TXT_MONTH_OVERVIEW', $lng->txt(
"cal_month_overview"));
197 $lng->txt(
'month_' . $this->seed->get(
IL_CAL_FKT_DATE,
'm') .
'_long') .
200 $myseed = clone($this->seed);
201 $ilCtrl->setParameterByClass(
'ilcalendarmonthgui',
'seed', $myseed->get(
IL_CAL_DATE));
202 $a_tpl->setVariable(
'OPEN_MONTH_VIEW', $ilCtrl->getLinkTargetByClass(
'ilcalendarmonthgui',
''));
212 $ilCtrl->getLinkTarget($this->getParentObject(),
"")
219 $ilCtrl->getLinkTarget($this->getParentObject(),
"")
223 $a_tpl->parseCurrentBlock();
static _buildMonthDayList($a_month, $a_year, $weekstart)
Build a month day list.
__construct(ilDate $seed, $a_par_obj)
Constructor.
static _numericDayToString($a_day, $a_long=true)
get
static _getInstanceByUserId($a_user_id)
get singleton instance
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
getParentObject()
Get Parent GUI object.
static _equals(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check if two date are equal.
special template class to simplify handling of ITX/PEAR
addMiniMonth($a_tpl)
Add mini version of monthly overview (Maybe extracted to another class, if used in pd calendar tab...
setParentObject($a_parentobject)
Set Parent GUI object.
static _isToday($date)
check if a date is today
const PRESENTATION_CALENDAR
getHTML()
Get HTML for calendar.
Represents a list of calendar appointments (including recurring events) for a specific user in a give...