24 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
25 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
55 $this->lng->loadLanguageModule(
'dateplaner');
58 $this->
setId(
'calinbox');
60 parent::__construct($a_parent_obj, $a_parent_cmd);
62 $this->
addColumn($this->lng->txt(
'date'),
'begin',
"30%");
63 $this->
addColumn($this->lng->txt(
'title'),
'title',
"40%");
64 #$this->addColumn($this->lng->txt('cal_duration'),'duration',"15%"); 65 $this->
addColumn($this->lng->txt(
'cal_recurrences'),
'frequence',
"15%");
66 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
"15%");
69 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
70 $this->
setRowTemplate(
"tpl.show_changed_appointment_row.html",
"Services/Calendar");
93 if ($a_set[
"milestone"]) {
94 $this->tpl->setCurrentBlock(
"img_ms");
96 $this->tpl->setVariable(
"ALT_MS", $lng->txt(
"cal_milestone"));
97 $this->tpl->parseCurrentBlock();
100 $this->tpl->setVariable(
'VAL_DESCRIPTION', $a_set[
'description']);
102 $this->tpl->setVariable(
'VAL_TITLE_LINK', $a_set[
'title']);
103 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $a_set[
'id']);
104 $this->tpl->setVariable(
'VAL_LINK', $this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
106 switch ($a_set[
'frequence']) {
108 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_daily'));
112 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_weekly'));
116 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_monthly'));
120 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_yearly'));
124 #$this->tpl->setVariable('VAL_FREQUENCE',$this->lng->txt('cal_no_recurrence')); 127 if ($a_set[
'fullday']) {
138 $this->tpl->setVariable(
'VAL_BEGIN', $date);
168 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
169 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
170 $appointments =
array();
172 foreach ($a_apps as $event) {
173 $entry = $event[
'event'];
177 $tmp_arr[
'id'] = $entry->getEntryId();
178 $tmp_arr[
'milestone'] = $entry->isMilestone();
179 $tmp_arr[
'title'] = $entry->getPresentationTitle();
180 $tmp_arr[
'description'] = $entry->getDescription();
181 $tmp_arr[
'fullday'] = $entry->isFullday();
182 #$tmp_arr['begin'] = $entry->getStart()->get(IL_CAL_UNIX); 183 #$tmp_arr['end'] = $entry->getEnd()->get(IL_CAL_UNIX); 185 $tmp_arr[
'begin'] = $event[
'dstart'];
186 $tmp_arr[
'end'] = $event[
'dend'];
188 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
189 if ($tmp_arr[
'fullday']) {
190 $tmp_arr[
'duration'] += (60 * 60 * 24);
192 if (!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin']) {
193 $tmp_arr[
'duration'] =
'';
196 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
197 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
199 $appointments[] = $tmp_arr;
203 $appointments = array_slice($appointments, 0, $this->
getLimit());
205 $this->
setData($appointments ? $appointments :
array());
const IL_CAL_FREQ_MONTHLY
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static _getFirstRecurrence($a_cal_id)
get first recurrence
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
setAppointments($a_apps)
set appointments
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
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.