24 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
53 $this->lng->loadLanguageModule(
'dateplaner');
58 $this->
addColumn($this->lng->txt(
'title'),
'title',
"40%");
59 $this->
addColumn($this->lng->txt(
'cal_start'),
'begin',
"15%");
60 $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
61 $this->
addColumn($this->lng->txt(
'cal_recurrences'),
'frequence',
"10%");
62 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
"15%");
65 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
66 $this->
setRowTemplate(
"tpl.show_changed_appointment_row.html",
"Services/Calendar");
89 if ($a_set[
"milestone"])
91 $this->tpl->setCurrentBlock(
"img_ms");
93 $this->tpl->setVariable(
"ALT_MS", $lng->txt(
"cal_milestone"));
94 $this->tpl->parseCurrentBlock();
97 $this->tpl->setVariable(
'VAL_DESCRIPTION',$a_set[
'description']);
99 $this->tpl->setVariable(
'VAL_TITLE_LINK',$a_set[
'title']);
100 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$a_set[
'id']);
101 $this->tpl->setVariable(
'VAL_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
103 switch($a_set[
'frequence'])
106 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_daily'));
110 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_weekly'));
114 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_monthly'));
118 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_yearly'));
122 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_no_recurrence'));
123 break; $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
126 if($a_set[
'fullday'])
136 if($a_set[
'duration'])
138 if($a_set[
'milestone'])
140 $this->tpl->setVariable(
'VAL_DURATION',
'-');
149 $this->tpl->setVariable(
'VAL_DURATION',
'');
165 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
166 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
169 foreach($a_apps as $entry)
173 $tmp_arr[
'id'] = $entry->getEntryId();
174 $tmp_arr[
'milestone'] = $entry->isMilestone();
175 $tmp_arr[
'title'] = $entry->getPresentationTitle();
176 $tmp_arr[
'description'] = $entry->getDescription();
177 $tmp_arr[
'fullday'] = $entry->isFullday();
178 $tmp_arr[
'begin'] = $entry->getStart()->get(
IL_CAL_UNIX);
179 $tmp_arr[
'end'] = $entry->getEnd()->get(
IL_CAL_UNIX);
181 #$tmp_arr['duration'] = ($dur = $tmp_arr['end'] - $tmp_arr['begin']) ? $dur : 60 * 60 * 24;
182 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
183 if($tmp_arr[
'fullday'])
185 $tmp_arr[
'duration'] += (60 * 60 * 24);
187 if(!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin'])
189 $tmp_arr[
'duration'] =
'';
192 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
193 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
195 $appointments[] = $tmp_arr;
198 $this->
setData($appointments ? $appointments : array());