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',
"40%");
61 $this->
addColumn($this->lng->txt(
'cal_start'),
'begin',
"15%");
62 $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
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'])
138 if($a_set[
'duration'])
140 if($a_set[
'milestone'])
142 $this->tpl->setVariable(
'VAL_DURATION',
'-');
151 $this->tpl->setVariable(
'VAL_DURATION',
'');
167 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
168 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
171 foreach($a_apps as $entry)
175 $tmp_arr[
'id'] = $entry->getEntryId();
176 $tmp_arr[
'milestone'] = $entry->isMilestone();
177 $tmp_arr[
'title'] = $entry->getPresentationTitle();
178 $tmp_arr[
'description'] = $entry->getDescription();
179 $tmp_arr[
'fullday'] = $entry->isFullday();
180 $tmp_arr[
'begin'] = $entry->getStart()->get(
IL_CAL_UNIX);
181 $tmp_arr[
'end'] = $entry->getEnd()->get(
IL_CAL_UNIX);
183 #$tmp_arr['duration'] = ($dur = $tmp_arr['end'] - $tmp_arr['begin']) ? $dur : 60 * 60 * 24;
184 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
185 if($tmp_arr[
'fullday'])
187 $tmp_arr[
'duration'] += (60 * 60 * 24);
189 if(!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin'])
191 $tmp_arr[
'duration'] =
'';
194 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
195 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
197 $appointments[] = $tmp_arr;
200 $this->
setData($appointments ? $appointments : array());