24 include_once(
'./Services/Calendar/classes/class.ilCalendarUserSettings.php');
59 $this->lng->loadLanguageModule(
'dateplaner');
71 $this->parentobject = $a_parentobject;
81 return $this->parentobject;
94 "tpl.calendar_block_frame.html",
101 "tpl.calendar_block.html",
108 $ftpl->setVariable(
"BLOCK_TITLE",
$lng->txt(
"calendar"));
109 $ftpl->setVariable(
"CONTENT",
$tpl->get());
126 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
127 $a_tpl->setCurrentBlock(
'month_header_col');
128 $a_tpl->setVariable(
'TXT_WEEKDAY',
$lng->txt(
"cal_week_abbrev"));
129 $a_tpl->parseCurrentBlock();
130 for (
$i = (
int) $this->user_settings->getWeekStart();
$i < (7 + (int) $this->user_settings->getWeekStart());
$i++) {
131 $a_tpl->setCurrentBlock(
'month_header_col');
133 $a_tpl->parseCurrentBlock();
136 include_once(
'Services/Calendar/classes/class.ilCalendarSchedule.php');
138 $this->scheduler->calculate();
144 $this->user_settings->getWeekStart()
150 $a_tpl->setCurrentBlock(
'month_col');
152 if (count($this->scheduler->getByDay($date,
$ilUser->getTimeZone()))) {
153 $a_tpl->setVariable(
'DAY_CLASS',
'calminiapp');
154 #$a_tpl->setVariable('TD_CLASS','calminiapp'); 157 include_once(
'./Services/Calendar/classes/class.ilCalendarUtil.php');
159 $a_tpl->setVariable(
'TD_CLASS',
'calminitoday');
161 #elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_DAY)) 163 # $a_tpl->setVariable('TD_CLASS','calmininow'); 166 $a_tpl->setVariable(
'TD_CLASS',
'calministd');
168 $a_tpl->setVariable(
'TD_CLASS',
'calminiprev');
170 $a_tpl->setVariable(
'TD_CLASS',
'calmininext');
178 $ilCtrl->clearParametersByClass(
'ilcalendardaygui');
180 $a_tpl->setVariable(
'OPEN_DAY_VIEW',
$ilCtrl->getLinkTargetByClass(
'ilcalendardaygui',
''));
181 $ilCtrl->clearParametersByClass(
'ilcalendardaygui');
183 $a_tpl->setVariable(
'MONTH_DAY', $month_day);
184 $a_tpl->parseCurrentBlock();
186 if ($counter
and !($counter % 7)) {
187 $a_tpl->setCurrentBlock(
'week');
192 $a_tpl->parseCurrentBlock();
194 $a_tpl->setCurrentBlock(
'month_row');
195 $ilCtrl->clearParametersByClass(
'ilcalendarweekgui');
197 $ilCtrl->clearParametersByClass(
'ilcalendarweekgui');
198 $a_tpl->setVariable(
'TD_CLASS',
'calminiweek');
199 $a_tpl->parseCurrentBlock();
202 $a_tpl->setCurrentBlock(
'mini_month');
209 $myseed = clone($this->seed);
210 $ilCtrl->setParameterByClass(
'ilcalendarmonthgui',
'seed', $myseed->get(
IL_CAL_DATE));
211 $a_tpl->setVariable(
'OPEN_MONTH_VIEW',
$ilCtrl->getLinkTargetByClass(
'ilcalendarmonthgui',
''));
221 $ilCtrl->getLinkTarget($this->getParentObject(),
"")
228 $ilCtrl->getLinkTarget($this->getParentObject(),
"")
232 $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...