34 include_once(
'./classes/class.ilObjectGUI.php');
44 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
52 $this->lng->loadLanguageModule(
'dateplaner');
53 $this->lng->loadLanguageModule(
'jscalendar');
66 $next_class = $this->ctrl->getNextClass($this);
67 $cmd = $this->ctrl->getCmd();
71 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
73 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
78 case 'ilpermissiongui':
79 $this->tabs_gui->setTabActive(
'perm_settings');
80 include_once(
"./classes/class.ilPermissionGUI.php");
82 $ret =& $this->ctrl->forwardCommand($perm_gui);
86 $this->tabs_gui->setTabActive(
'settings');
108 global $rbacsystem, $ilAccess;
110 if ($ilAccess->checkAccess(
"read",
'',$this->object->getRefId()))
112 $this->tabs_gui->addTarget(
"settings",
113 $this->ctrl->getLinkTarget($this,
"settings"),
114 array(
"settings",
"view"));
117 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
119 $this->tabs_gui->addTarget(
"perm_settings",
120 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
121 array(),
'ilpermissiongui');
130 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
132 include_once(
'./Services/Calendar/classes/iCal/class.ilICalParser.php');
134 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php');
135 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrence.php');
136 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
138 #$parser = new ilICalParser('./extern/Feiertage.ics',ilICalParser::INPUT_FILE);
139 #$parser->setCategoryId(6);
150 #echo "RESULT: ".$list;
170 #$parser = new ilICalParser('./extern/fc.ics',ilICalParser::INPUT_FILE);
171 #$parser->setCategoryId(11);
172 #$parser = new ilICalParser('./Feiertage.ics',ilICalParser::INPUT_FILE);
174 #$entry = new ilCalendarEntry(927);
190 $this->tabs_gui->setTabActive(
'settings');
192 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.settings.html',
'Services/Calendar');
193 $this->tpl->setVariable(
'CAL_SETTINGS',$this->form->getHTML());
204 $this->
settings->setEnabled((
int) $_POST[
'enable']);
205 $this->
settings->setDefaultWeekStart((
int) $_POST[
'default_week_start']);
207 $this->
settings->setDefaultTimeFormat((
int) $_POST[
'default_time_format']);
221 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
232 if(is_object($this->form))
236 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
237 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
240 $this->form->setFormAction($this->ctrl->getFormAction($this));
241 $this->form->setTitle($this->lng->txt(
'cal_global_settings'));
242 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
243 #$this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
247 $check->setChecked($this->
settings->isEnabled() ?
true :
false);
248 $this->form->addItem($check);
252 $this->form->addItem($server_tz);
254 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_def_timezone'),
'default_timezone');
256 $select->setInfo($this->lng->txt(
'cal_def_timezone_info'));
257 $select->setValue($this->
settings->getDefaultTimeZone());
258 $this->form->addItem($select);
260 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_def_time_format'),
'default_time_format');
264 $select->setInfo($this->lng->txt(
'cal_def_time_format_info'));
265 $select->setValue($this->
settings->getDefaultTimeFormat());
266 $this->form->addItem($select);
273 $radio->addOption($option);
275 $radio->addOption($option);
278 $this->form->addItem($radio);