24 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
25 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
55 $this->lng->loadLanguageModule(
'dateplaner');
60 $this->
addColumn($this->lng->txt(
'title'),
'title',
"30%");
61 $this->
addColumn($this->lng->txt(
'date'),
'begin',
"30%");
62 $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"15%");
63 $this->
addColumn($this->lng->txt(
'cal_recurrences'),
'frequence',
"10%");
64 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
"15%");
67 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
68 $this->
setRowTemplate(
"tpl.show_changed_appointment_row.html",
"Services/Calendar");
91 if ($a_set[
"milestone"])
93 $this->tpl->setCurrentBlock(
"img_ms");
95 $this->tpl->setVariable(
"ALT_MS", $lng->txt(
"cal_milestone"));
96 $this->tpl->parseCurrentBlock();
99 $this->tpl->setVariable(
'VAL_DESCRIPTION',$a_set[
'description']);
101 $this->tpl->setVariable(
'VAL_TITLE_LINK',$a_set[
'title']);
102 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$a_set[
'id']);
103 $this->tpl->setVariable(
'VAL_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
105 switch($a_set[
'frequence'])
108 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_daily'));
112 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_weekly'));
116 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_monthly'));
120 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_yearly'));
124 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_no_recurrence'));
125 break; $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
128 if($a_set[
'fullday'])
142 $this->tpl->setVariable(
'VAL_BEGIN',$date);
143 if($a_set[
'duration'])
145 if($a_set[
'milestone'])
147 $this->tpl->setVariable(
'VAL_DURATION',
'-');
156 $this->tpl->setVariable(
'VAL_DURATION',
'');
172 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
173 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
176 foreach($a_apps as $entry)
180 $tmp_arr[
'id'] = $entry->getEntryId();
181 $tmp_arr[
'milestone'] = $entry->isMilestone();
182 $tmp_arr[
'title'] = $entry->getPresentationTitle();
183 $tmp_arr[
'description'] = $entry->getDescription();
184 $tmp_arr[
'fullday'] = $entry->isFullday();
185 $tmp_arr[
'begin'] = $entry->getStart()->get(
IL_CAL_UNIX);
186 $tmp_arr[
'end'] = $entry->getEnd()->get(
IL_CAL_UNIX);
188 #$tmp_arr['duration'] = ($dur = $tmp_arr['end'] - $tmp_arr['begin']) ? $dur : 60 * 60 * 24;
189 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
190 if($tmp_arr[
'fullday'])
192 $tmp_arr[
'duration'] += (60 * 60 * 24);
194 if(!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin'])
196 $tmp_arr[
'duration'] =
'';
199 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
200 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
202 $appointments[] = $tmp_arr;
205 $this->
setData($appointments ? $appointments : array());