66 if(isset(self::$instance) and self::$instance)
87 $this->tpl =
new ilTemplate(
'tpl.appointment_panel.html',
true,
true,
'Services/Calendar');
90 $this->tpl->setVariable(
'PANEL_NUM',self::$counter);
91 $this->tpl->setVariable(
'PANEL_TITLE',$a_app[
'event']->getPresentationTitle());
92 if ($a_app[
"event"]->isMilestone())
94 $this->tpl->setVariable(
'PANEL_DETAILS',$this->lng->txt(
'cal_ms_details'));
98 $this->tpl->setVariable(
'PANEL_DETAILS',$this->lng->txt(
'cal_details'));
100 $this->tpl->setVariable(
'PANEL_TXT_DATE',$this->lng->txt(
'date'));
102 if($a_app[
'fullday'])
114 if($a_app[
'event']->getLocation())
116 $this->tpl->setVariable(
'PANEL_TXT_WHERE',$this->lng->txt(
'cal_where'));
117 $this->tpl->setVariable(
'PANEL_WHERE',$a_app[
'event']->getLocation());
119 if($a_app[
'event']->getDescription())
121 $this->tpl->setVariable(
'PANEL_TXT_DESC',$this->lng->txt(
'description'));
122 $this->tpl->setVariable(
'PANEL_DESC',nl2br($a_app[
'event']->getDescription()));
125 if($a_app[
'event']->isMilestone() && $a_app[
'event']->getCompletion() > 0)
127 $this->tpl->setVariable(
'PANEL_TXT_COMPL',$this->lng->txt(
'cal_task_completion'));
128 $this->tpl->setVariable(
'PANEL_COMPL',$a_app[
'event']->getCompletion().
" %");
131 if ($a_app[
'event']->isMilestone())
134 $users = $a_app[
'event']->readResponsibleUsers();
136 foreach($users as $r)
138 $value.= $delim.$r[
"lastname"].
", ".$r[
"firstname"].
" [".$r[
"login"].
"]";
141 if (count($users) > 0)
143 $this->tpl->setVariable(
'PANEL_TXT_RESP', $this->lng->txt(
'cal_responsible'));
144 $this->tpl->setVariable(
'PANEL_RESP', $value);
148 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
152 $this->tpl->setVariable(
'PANEL_TXT_CAL_TYPE',$this->lng->txt(
'cal_cal_type'));
153 switch($cat_info[
'type'])
156 $this->tpl->setVariable(
'PANEL_CAL_TYPE',$this->lng->txt(
'cal_type_system'));
160 $this->tpl->setVariable(
'PANEL_CAL_TYPE',$this->lng->txt(
'cal_type_personal'));
165 $this->tpl->setVariable(
'PANEL_CAL_TYPE',$this->lng->txt(
'cal_type_'.$type));
169 $this->tpl->setVariable(
'PANEL_TXT_CAL_NAME',$this->lng->txt(
'cal_calendar_name'));
170 $this->tpl->setVariable(
'PANEL_CAL_NAME',$cat_info[
'title']);
173 if($cat_info[
'editable'] and !$a_app[
'event']->isAutoGenerated())
175 $this->tpl->setCurrentBlock(
'panel_edit_link');
176 $this->tpl->setVariable(
'TXT_PANEL_EDIT',$this->lng->txt(
'edit'));
178 $this->ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
179 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$a_app[
'event']->getEntryId());
180 $this->tpl->setVariable(
'PANEL_EDIT_HREF',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
181 $this->tpl->parseCurrentBlock();
183 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
190 $lng->txt(
'obj_'.
$type);
192 include_once(
'classes/class.ilLink.php');
194 $parent = $tree->getParentId(current($refs));
196 $this->tpl->setVariable(
'PANEL_TXT_LINK',$this->lng->txt(
'ext_link'));
197 $this->tpl->setVariable(
'PANEL_LINK_HREF',$href);
198 $this->tpl->setVariable(
'PANEL_LINK_NAME',
$title);
199 $this->tpl->setVariable(
'PANEL_PARENT',$parent_title);
202 return $this->tpl->get();