24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
51 $this->lng->loadLanguageModule(
'dateplaner');
56 $this->
setId(
'calmng');
61 $this->
addColumn($this->lng->txt(
'type'),
'type_sortable',
"1");
62 $this->
addColumn($this->lng->txt(
'title'),
'title',
"100%");
66 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
67 $this->
setRowTemplate(
"tpl.show_category_row.html",
"Services/Calendar");
69 if (!$ilUser->prefs[
"screen_reader_optimization"])
76 $this->
enable(
'select_all');
96 $this->tpl->setVariable(
'VAL_ID',$a_set[
'id']);
99 $this->tpl->setVariable(
'VAL_CHECKED',
'checked="checked"');
101 $this->tpl->setVariable(
'VAL_TITLE',$a_set[
'title']);
102 $this->tpl->setVariable(
'BGCOLOR',$a_set[
'color']);
104 $this->ctrl->setParameter($this->
getParentObject(),
'category_id',$a_set[
'id']);
105 $this->tpl->setVariable(
'EDIT_LINK',$this->ctrl->getLinkTarget($this->getParentObject(),
'details'));
106 $this->tpl->setVariable(
'TXT_EDIT',$this->lng->txt(
'edit'));
108 switch($a_set[
'type'])
112 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_type_system'));
117 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'cal_type_personal'));
123 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'cal_type_'.$type));
126 if(strlen($a_set[
'path']))
128 $this->tpl->setCurrentBlock(
'calendar_path');
129 $this->tpl->setVariable(
'ADD_PATH_INFO',$a_set[
'path']);
130 $this->tpl->parseCurrentBlock();
135 $this->ctrl->setParameterByClass(
'ilcalendarsubscriptiongui',
'seed',$this->seed->get(
IL_CAL_DATE));
136 $this->ctrl->setParameterByClass(
'ilcalendarsubscriptiongui',
'cal_id',$a_set[
'id']);
137 $this->tpl->setVariable(
'SUB_LINK',$this->ctrl->getLinkTargetByClass(array(
'ilcalendarpresentationgui',
'ilcalendarsubscriptiongui')));
138 $this->tpl->setVariable(
'SUB_ALT',$this->lng->txt(
'ical_export'));
152 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
153 include_once(
'./Services/Calendar/classes/class.ilCalendarHidden.php');
156 $hidden = $hidden_obj->getHidden();
159 $all = $cats->getCategoriesInfo();
160 $tmp_title_counter = array();
161 $categories = array();
162 foreach($all as $category)
164 $tmp_arr[
'obj_id'] = $category[
'obj_id'];
165 $tmp_arr[
'id'] = $category[
'cat_id'];
166 $tmp_arr[
'hidden'] = (bool) in_array($category[
'cat_id'],$hidden);
167 $tmp_arr[
'title'] = $category[
'title'];
168 $tmp_arr[
'type'] = $category[
'type'];
174 $tmp_arr[
'type_sortable'] .= (
'_'.ilObject::_lookupType($category[
'obj_id']));
177 $tmp_arr[
'color'] = $category[
'color'];
178 $tmp_arr[
'editable'] = $category[
'editable'];
180 $categories[] = $tmp_arr;
183 $tmp_title_counter[$category[
'type'].
'_'.$category[
'title']]++;
187 $path_categories = array();
188 foreach($categories as $cat)
192 if($tmp_title_counter[$cat[
'type'].
'_'.$cat[
'title']] > 1)
196 $cat[
'path'] = $this->
buildPath($ref_id);
201 $path_categories[] = $cat;
203 $this->
setData($path_categories);
210 $path_arr = $tree->getPathFull($a_ref_id,ROOT_FOLDER_ID);
212 unset($path_arr[count($path_arr) - 1]);
214 foreach($path_arr as
$data)
220 $path .= $data[
'title'];
222 if(strlen(
$path) > 30)
224 return '...'.substr(
$path,-30);