98 $this->tpl =
new ilTemplate(
'tpl.month_view.html',
true,
true,
'components/ILIAS/Calendar');
103 $this->tpl->setVariable(
'NAVIGATION', $navigation->getHTML());
105 for ($i = $this->user_settings->getWeekStart(); $i < (7 + $this->user_settings->getWeekStart()); $i++) {
106 $this->tpl->setCurrentBlock(
'month_header_col');
108 $this->tpl->parseCurrentBlock();
113 $disable_empty =
true;
118 $disable_empty =
false;
122 $disable_empty =
false;
127 $is_portfolio_embedded =
false;
130 $is_portfolio_embedded =
true;
133 $scheduler->addSubitemCalendars(
true);
134 if (
sizeof($this->schedule_filters)) {
135 foreach ($this->schedule_filters as $filter) {
136 $scheduler->addFilter($filter);
139 $scheduler->calculate();
147 $this->user_settings->getWeekStart()
150 $has_events = (bool) $this->
showEvents($scheduler, $date);
152 if (!$this->view_with_appointments && $has_events) {
153 $this->view_with_appointments =
true;
157 $this->
ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
158 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'idate', $date->get(
IL_CAL_DATE));
159 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'seed', $this->seed->get(
IL_CAL_DATE));
161 $this->
ctrl->setParameterByClass(
"ilcalendarappointmentgui",
"hour", $current_hour);
162 $new_app_url = $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'add');
164 $this->tpl->setCurrentBlock(
"new_app");
165 $this->tpl->setVariable(
167 $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add($new_app_url))
169 $this->tpl->parseCurrentBlock();
183 if (!$is_portfolio_embedded &&
184 (!$disable_empty || $has_events)) {
185 $this->tpl->setCurrentBlock(
'month_day_link');
186 $this->
ctrl->clearParametersByClass(
'ilcalendardaygui');
187 $this->
ctrl->setParameterByClass(
'ilcalendardaygui',
'seed', $date->get(
IL_CAL_DATE));
188 $this->tpl->setVariable(
'OPEN_DAY_VIEW', $this->
ctrl->getLinkTargetByClass(
'ilcalendardaygui',
''));
189 $this->
ctrl->clearParametersByClass(
'ilcalendardaygui');
191 $this->tpl->setCurrentBlock(
'month_day_no_link');
194 $this->tpl->setVariable(
'MONTH_DAY', $month_day);
196 $this->tpl->parseCurrentBlock();
198 $this->tpl->setCurrentBlock(
'month_col');
201 $this->tpl->setVariable(
'TD_CLASS',
'caltoday');
203 $this->tpl->setVariable(
'TD_CLASS',
'calstd');
205 $this->tpl->setVariable(
'TD_CLASS',
'calprev');
207 $this->tpl->setVariable(
'TD_CLASS',
'calnext');
209 $this->tpl->parseCurrentBlock();
210 if ($counter && !($counter % 7)) {
211 $this->tpl->setCurrentBlock(
'month_row');
212 $this->tpl->parseCurrentBlock();
static _buildMonthDayList(int $a_month, int $a_year, int $weekstart)
Build a month day list.
static _numericMonthToString(int $a_month, bool $a_long=true, ?ilLanguage $lng=null)
numeric month to string
showEvents(ilCalendarSchedule $scheduler, ilDate $date)
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static _numericDayToString(int $a_day, bool $a_long=true, ?ilLanguage $lng=null)
static initDragDrop(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Drag and Drop used in Modules/Survey, Services/Calendar, Services/COPage, Services/Form (Jan 2022)
const MODE_PORTFOLIO_CONSULTATION
static _getInstance($a_usr_id=0)
get singleton instance
static _equals(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
Check if two date are equal.
static _isToday(ilDateTime $date)
Represents a list of calendar appointments (including recurring events) for a specific user in a give...