{
self::$counter++;
$this->tpl =
new ilTemplate(
'tpl.appointment_panel.html',
true,
true,
'Services/Calendar');
$this->tpl->setVariable('PANEL_NUM',self::$counter);
$this->tpl->setVariable('PANEL_TITLE',$a_app['event']->getPresentationTitle());
if ($a_app["event"]->isMilestone())
{
$this->tpl->setVariable('PANEL_DETAILS',$this->lng->txt('cal_ms_details'));
}
else
{
$this->tpl->setVariable('PANEL_DETAILS',$this->lng->txt('cal_details'));
}
$this->tpl->setVariable('PANEL_TXT_DATE',$this->lng->txt('date'));
if($a_app['fullday'])
{
}
else
{
}
if($a_app['event']->getLocation())
{
$this->tpl->setVariable('PANEL_TXT_WHERE',$this->lng->txt('cal_where'));
$this->tpl->setVariable('PANEL_WHERE',$a_app['event']->getLocation());
}
if($a_app['event']->getDescription())
{
$this->tpl->setVariable('PANEL_TXT_DESC',$this->lng->txt('description'));
$this->tpl->setVariable('PANEL_DESC',nl2br($a_app['event']->getDescription()));
}
if($a_app['event']->isMilestone() && $a_app['event']->getCompletion() > 0)
{
$this->tpl->setVariable('PANEL_TXT_COMPL',$this->lng->txt('cal_task_completion'));
$this->tpl->setVariable('PANEL_COMPL',$a_app['event']->getCompletion()." %");
}
if ($a_app['event']->isMilestone())
{
$users = $a_app['event']->readResponsibleUsers();
$delim = "";
foreach($users as $r)
{
$value.= $delim.$r["lastname"].", ".$r["firstname"]." [".$r["login"]."]";
$delim = "<br />";
}
if (count($users) > 0)
{
$this->tpl->setVariable('PANEL_TXT_RESP', $this->lng->txt('cal_responsible'));
$this->tpl->setVariable('PANEL_RESP', $value);
}
}
include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
$this->tpl->setVariable('PANEL_TXT_CAL_TYPE',$this->lng->txt('cal_cal_type'));
switch($cat_info['type'])
{
$this->tpl->setVariable('PANEL_CAL_TYPE',$this->lng->txt('cal_type_system'));
break;
$this->tpl->setVariable('PANEL_CAL_TYPE',$this->lng->txt('cal_type_personal'));
break;
$this->tpl->setVariable('PANEL_CAL_TYPE',$this->lng->txt('cal_type_'.$type));
break;
}
$this->tpl->setVariable('PANEL_TXT_CAL_NAME',$this->lng->txt('cal_calendar_name'));
$this->tpl->setVariable('PANEL_CAL_NAME',$cat_info['title']);
if($cat_info['editable'] and !$a_app['event']->isAutoGenerated())
{
$this->tpl->setCurrentBlock('panel_edit_link');
$this->tpl->setVariable('TXT_PANEL_EDIT',$this->lng->txt('edit'));
$this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
$this->ctrl->setParameterByClass('ilcalendarappointmentgui','app_id',$a_app['event']->getEntryId());
$this->tpl->setVariable('PANEL_EDIT_HREF',$this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui','edit'));
$this->tpl->parseCurrentBlock();
}
include_once('./Services/Calendar/classes/class.ilCalendarCategory.php');
{
include_once('classes/class.ilLink.php');
$parent = $tree->getParentId(current($refs));
$this->tpl->setVariable('PANEL_TXT_LINK',$this->lng->txt('ext_link'));
$this->tpl->setVariable('PANEL_LINK_HREF',$href);
$this->tpl->setVariable(
'PANEL_LINK_NAME',
$title);
$this->tpl->setVariable('PANEL_PARENT',$parent_title);
}
return $this->tpl->get();
}