24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
25 include_once(
'./Services/Calendar/classes/class.ilCalendarShared.php');
49 parent::__construct($parent_obj,$parent_cmd);
51 $this->
setRowTemplate(
'tpl.calendar_shared_list_row.html',
'Services/Calendar');
52 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
55 $this->
addColumn($this->lng->txt(
'type'),
'type',
'1px');
56 $this->
addColumn($this->lng->txt(
'title'),
'title',
'80%');
57 $this->
addColumn($this->lng->txt(
'cal_shared_access_table_col'),
'access',
'20%');
59 $this->
addMultiCommand(
'shareDeassign',$this->lng->txt(
'cal_unshare_cal'));
73 $this->calendar_id = $a_calendar_id;
84 $this->tpl->setVariable(
'VAL_ID',$a_set[
'obj_id']);
85 $this->tpl->setVariable(
'NAME',$a_set[
'title']);
87 if(strlen($a_set[
'description']))
89 $this->tpl->setVariable(
'DESCRIPTION',$a_set[
'description']);
93 $this->tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$a_set[
'type']));
95 if($a_set[
'writable'])
97 $this->tpl->setVariable(
'CAL_ACCESS',$this->lng->txt(
'cal_shared_access_read_write'));
101 $this->tpl->setVariable(
'CAL_ACCESS',$this->lng->txt(
'cal_shared_access_read_only'));
117 foreach($this->shared_obj->getShared() as $item)
119 switch($item[
'obj_type'])
122 $data[
'type'] =
'usr';
125 $data[
'title'] = $name[
'lastname'].
', '.$name[
'firstname'];
126 $data[
'description'] =
'';
131 $data[
'type'] =
'role';
136 $data[
'obj_id'] = $item[
'obj_id'];
137 $data[
'create_date'] = $item[
'create_date'];
138 $data[
'writable'] = $item[
'writable'];
static _lookupName($a_user_id)
lookup user name
static _lookupTitle($a_id)
lookup object title
Handles shared calendars.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupDescription($a_id)
lookup object description
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setCalendarId($a_calendar_id)
set ids
__construct($parent_obj, $parent_cmd)
Constructor.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.