24 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
51 $this->cat_id = $a_category_id;
52 $this->is_editable = $this->categories->isEditable($this->cat_id);
55 $this->lng->loadLanguageModule(
'dateplaner');
61 $this->
addColumn($this->lng->txt(
'title'),
'title',
"50%");
62 $this->
addColumn($this->lng->txt(
'cal_start'),
'begin',
"20%");
63 $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
64 $this->
addColumn($this->lng->txt(
'cal_recurrences'),
'frequence',
"10%");
66 if($this->is_editable)
68 $this->
addMultiCommand(
'askDeleteAppointments',$this->lng->txt(
'delete'));
69 $this->
enable(
'select_all');
76 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
77 $this->
setRowTemplate(
"tpl.show_appointment_row.html",
"Services/Calendar");
101 if($a_set[
'deletable'])
103 $this->tpl->setVariable(
'VAL_ID',$a_set[
'id']);
106 $this->tpl->setVariable(
'VAL_DESCRIPTION',$a_set[
'description']);
108 $this->tpl->setVariable(
'VAL_TITLE_LINK',$a_set[
'title']);
109 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$a_set[
'id']);
110 $this->tpl->setVariable(
'VAL_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
112 switch($a_set[
'frequence'])
115 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_daily'));
119 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_weekly'));
123 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_monthly'));
127 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_yearly'));
131 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_no_recurrence'));
132 break; $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
135 if($a_set[
'fullday'])
145 if($a_set[
'duration'])
151 $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 $cal_entry_id)
174 $tmp_arr[
'id'] = $entry->getEntryId();
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);
188 if(!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin'])
190 $tmp_arr[
'duration'] =
'';
192 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
195 $appointments[] = $tmp_arr;
197 $this->
setData($appointments ? $appointments : array());