24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
53 $this->
setId(
"calmng");
55 include_once(
"./Services/Calendar/classes/class.ilCalendarActions.php");
59 $this->lng->loadLanguageModule(
'dateplaner');
62 parent::__construct($a_parent_obj,
'manage');
65 $this->
addColumn($this->lng->txt(
'type'),
'type_sortable',
'1%');
66 $this->
addColumn($this->lng->txt(
'title'),
'title',
'79%');
70 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj,
"manage"));
72 $this->
enable(
'select_all');
114 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
116 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
117 $current_selection_list->setId(
"act_" . $a_set[
'id']);
119 $this->ctrl->setParameter($this->
getParentObject(),
'category_id', $a_set[
'id']);
122 if ($this->actions->checkSettingsCal($a_set[
'id'])) {
124 $current_selection_list->addItem($this->lng->txt(
'settings'),
'',
$url);
128 if ($this->actions->checkAddEvent($a_set[
'id'])) {
131 $current_selection_list->addItem($this->lng->txt(
'cal_import_appointments'),
'',
$url);
132 $this->ctrl->clearParameterByClass(get_class($this->
getParentObject()),
'backv');
136 if ($this->actions->checkUnshareCal($a_set[
'id'])) {
138 $current_selection_list->addItem($this->lng->txt(
'cal_unshare'),
'',
$url);
142 if ($this->actions->checkShareCal($a_set[
'id'])) {
144 $current_selection_list->addItem($this->lng->txt(
'cal_share'),
'',
$url);
148 if ($this->actions->checkSynchronizeCal($a_set[
'id'])) {
150 $current_selection_list->addItem($this->lng->txt(
'cal_cal_synchronize'),
'',
$url);
154 if ($this->actions->checkDeleteCal($a_set[
'id'])) {
156 $current_selection_list->addItem($this->lng->txt(
'delete'),
'',
$url);
158 $this->tpl->setCurrentBlock(
"checkbox");
159 $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
160 $this->tpl->parseCurrentBlock();
163 $this->ctrl->setParameter($this->
getParentObject(),
'category_id',
'');
165 switch ($a_set[
'type']) {
168 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_type_system'));
173 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_type_personal'));
179 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_type_' .
$type));
184 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_type_' .
$type));
189 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'cal_ch_ch'));
194 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
195 $this->ctrl->setParameterByClass(
196 "ilcalendarpresentationgui",
200 $this->tpl->setVariable(
202 $this->ctrl->getLinkTargetByClass(
203 "ilcalendarpresentationgui",
207 $this->ctrl->setParameterByClass(
"ilcalendarpresentationgui",
'category_id',
$_GET[
"category_id"]);
209 $this->tpl->setVariable(
'BGCOLOR', $a_set[
'color']);
210 $this->tpl->setVariable(
"ACTIONS", $current_selection_list->getHTML());
230 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
234 $tmp_title_counter =
array();
235 $categories =
array();
236 foreach ($cats->getCategoriesInfo() as $category) {
237 $tmp_arr[
'obj_id'] = $category[
'obj_id'];
238 $tmp_arr[
'id'] = $category[
'cat_id'];
239 $tmp_arr[
'title'] = $category[
'title'];
240 $tmp_arr[
'type'] = $category[
'type'];
248 $tmp_arr[
'color'] = $category[
'color'];
249 $tmp_arr[
'editable'] = $category[
'editable'];
250 $tmp_arr[
'accepted'] = $category[
'accepted'];
251 $tmp_arr[
'remote'] = $category[
'remote'];
253 $categories[] = $tmp_arr;
256 $tmp_title_counter[$category[
'type'] .
'_' . $category[
'title']]++;
259 $path_categories =
array();
260 foreach ($categories as $cat) {
262 if ($tmp_title_counter[$cat[
'type'] .
'_' . $cat[
'title']] > 1) {
264 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
266 $path->setUseImages(
false);
267 $path->enableTextOnly(
false);
268 $cat[
'path'] =
$path->getPath(ROOT_FOLDER_ID, $ref_id);
273 $path_categories[] = $cat;
275 $this->
setData($path_categories);
static lookupCategorySortIndex($a_type_id)
Lookup sort index of calendar type.
Creates a path for a start and endnode.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
resetOffset($a_in_determination=false)
Reset offset.
static getInstance()
Get instance.
resetToDefaults()
reset table to defaults
show list of alle calendars to manage
__construct($a_parent_obj)
Constructor.
getParentObject()
Get parent object.
static _getAllReferences($a_id)
get all reference ids of object
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setOrderDirection($a_order_direction)
set order direction public
setOrderField($a_order_field)
set order column
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
addMultiCommand($a_cmd, $a_text)
Add Command button.
enable($a_module_name)
enables particular modules of table
static _getInstance($a_usr_id=0)
get singleton instance
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.