24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
48 $this->
setId(
"calmng");
51 $this->lng->loadLanguageModule(
'dateplaner');
57 $this->
addColumn($this->lng->txt(
'type'),
'type_sortable',
'1%');
58 $this->
addColumn($this->lng->txt(
'title'),
'title',
'79%');
62 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj,
"manage"));
64 $this->
enable(
'select_all');
106 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
108 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
109 $current_selection_list->setId(
"act_".$a_set[
'id']);
111 $this->ctrl->setParameter($this->
getParentObject(),
'category_id',$a_set[
'id']);
114 if($a_set[
'editable'] &&
115 !in_array($a_set[
'type'], array(
121 $current_selection_list->addItem($this->lng->txt(
'edit'),
'', $url);
123 $this->tpl->setCurrentBlock(
"checkbox");
124 $this->tpl->setVariable(
'VAL_ID',$a_set[
'id']);
125 $this->tpl->parseCurrentBlock();
129 if($a_set[
'editable'] &&
130 !in_array($a_set[
'type'], array(
134 $url = $this->ctrl->getLinkTarget($this->
getParentObject(),
'importAppointments');
135 $current_selection_list->addItem($this->lng->txt(
'cal_import_appointments'),
'', $url);
138 if($a_set[
'accepted'])
140 $url = $this->ctrl->getLinkTarget($this->
getParentObject(),
'unshare');
141 $current_selection_list->addItem($this->lng->txt(
'cal_unshare'),
'', $url);
145 $url = $this->ctrl->getLinkTarget($this->
getParentObject(),
'shareSearch');
146 $current_selection_list->addItem($this->lng->txt(
'cal_share'),
'', $url);
151 $url = $this->ctrl->getLinkTarget($this->
getParentObject(),
'synchroniseCalendar');
152 $current_selection_list->addItem($this->lng->txt(
'cal_cal_synchronize'),
'',$url);
157 switch($a_set[
'type'])
161 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_type_system'));
166 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'cal_type_personal'));
172 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'cal_type_'.$type));
177 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'cal_type_'.$type));
181 $this->tpl->setVariable(
'VAL_TITLE',$a_set[
'title']);
182 $this->ctrl->setParameter(
187 $this->tpl->setVariable(
189 $this->ctrl->getLinkTarget(
190 $this->getParentObject(),
195 $this->tpl->setVariable(
'BGCOLOR',$a_set[
'color']);
196 $this->tpl->setVariable(
"ACTIONS", $current_selection_list->getHTML());
216 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
220 $tmp_title_counter = array();
221 $categories = array();
222 foreach($cats->getCategoriesInfo() as $category)
224 $tmp_arr[
'obj_id'] = $category[
'obj_id'];
225 $tmp_arr[
'id'] = $category[
'cat_id'];
226 $tmp_arr[
'title'] = $category[
'title'];
227 $tmp_arr[
'type'] = $category[
'type'];
233 $tmp_arr[
'type_sortable'] .= (
'_'.ilObject::_lookupType($category[
'obj_id']));
236 $tmp_arr[
'color'] = $category[
'color'];
237 $tmp_arr[
'editable'] = $category[
'editable'];
238 $tmp_arr[
'accepted'] = $category[
'accepted'];
239 $tmp_arr[
'remote'] = $category[
'remote'];
241 $categories[] = $tmp_arr;
244 $tmp_title_counter[$category[
'type'].
'_'.$category[
'title']]++;
247 $path_categories = array();
248 foreach($categories as $cat)
252 if($tmp_title_counter[$cat[
'type'].
'_'.$cat[
'title']] > 1)
256 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
258 $path->setUseImages(
false);
259 $path->enableTextOnly(
false);
260 $cat[
'path'] =
$path->getPath(ROOT_FOLDER_ID, $ref_id);
265 $path_categories[] = $cat;
267 $this->
setData($path_categories);