24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
25 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
26 include_once(
'./Services/Calendar/classes/class.ilCalendarSharedStatus.php');
54 $this->
setRowTemplate(
'tpl.calendar_inbox_shared_row.html',
'Services/Calendar');
57 $this->
addColumn($this->lng->txt(
'name'),
'title',
'50%');
58 $this->
addColumn($this->lng->txt(
'cal_apps'),
'apps',
'20%');
59 $this->
addColumn($this->lng->txt(
'create_date'),
'create_date',
'20%');
60 $this->
addColumn($this->lng->txt(
'cal_accepted'),
'accepted',
'5%');
62 $this->
addMultiCommand(
'acceptShared',$this->lng->txt(
'cal_share_accept'));
63 $this->
addMultiCommand(
'declineShared',$this->lng->txt(
'cal_share_decline'));
68 $this->
setTitle($this->lng->txt(
'cal_shared_calendars'));
81 $this->tpl->setVariable(
'VAL_ID',$a_set[
'cal_id']);
82 $this->tpl->setVariable(
'CALENDAR_NAME',$a_set[
'name']);
83 $this->tpl->setVariable(
'TXT_FROM',$this->lng->txt(
'owner'));
86 $this->tpl->setVariable(
'LASTNAME',$name[
'lastname']);
87 $this->tpl->setVariable(
'FIRSTNAME',$name[
'firstname']);
89 $this->tpl->setVariable(
'APPS_COUNT',$a_set[
'apps']);
92 if($a_set[
'accepted'])
95 $this->tpl->setVariable(
'ALT_ACC',$this->lng->txt(
'cal_accepted'));
97 if($a_set[
'declined'])
100 $this->tpl->setVariable(
'ALT_DEC',$this->lng->txt(
'cal_declined'));
114 $this->cal_data = $a_calendars ? $a_calendars : array();
129 $calendars = array();
133 foreach($this->cal_data as
$data)
135 if($status->isDeclined($data[
'cal_id']) || $status->isAccepted($data[
'cal_id']))
142 $calendars[$counter][
'cal_id'] = $data[
'cal_id'];
143 $calendars[$counter][
'create_date'] = $data[
'create_date'];
144 $calendars[$counter][
'obj_type'] = $data[
'obj_type'];
145 $calendars[$counter][
'name'] = $tmp_calendar->getTitle();
146 $calendars[$counter][
'owner'] = $tmp_calendar->getObjId();
148 $calendars[$counter][
'accepted'] = $status->isAccepted($data[
'cal_id']);
149 $calendars[$counter][
'declined'] = $status->isDeclined($data[
'cal_id']);
154 $this->
setData($calendars ? $calendars : array());
155 return count($calendars) ?
true :
false;