5require_once
"./Services/Object/classes/class.ilObjectGUI.php";
29 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
31 $lng->loadLanguageModule(
"delic");
32 $lng->loadLanguageModule(
"maps");
33 $lng->loadLanguageModule(
"mathjax");
50 $this->ctrl->setParameter($this,
"ref_id",$this->object->getRefId());
52 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
54 $tabs_gui->addTarget(
"settings",
55 $this->ctrl->getLinkTarget($this,
"view"),
56 array(
"editMaps",
"editMathJax",
"editSocialBookmarks",
""),
"",
"");
57 $this->lng->loadLanguageModule(
'ecs');
60 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
62 $tabs_gui->addTarget(
"perm_settings",
63 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
71 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
73 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
78 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
80 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
87 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
89 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
92 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
94 if ($form->checkInput())
96 $title = $form->getInput(
'title');
97 $link = $form->getInput(
'link');
98 $file = $form->getInput(
'image_file');
99 $active = $form->getInput(
'activate');
101 $extension = pathinfo(
$file[
'name'], PATHINFO_EXTENSION);
102 $icon_path =
ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR .
'social_bm_icons' . DIRECTORY_SEPARATOR . time() .
'.' . $extension;
117 $form->setValuesByPost();
118 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
126 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
128 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
131 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
133 if ($form->checkInput())
135 $title = $form->getInput(
'title');
136 $link = $form->getInput(
'link');
137 $file = $form->getInput(
'image_file');
138 $active = $form->getInput(
'activate');
139 $id = $form->getInput(
'sbm_id');
145 $extension = pathinfo(
$file[
'name'], PATHINFO_EXTENSION);
146 $icon_path =
ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR .
'social_bm_icons' . DIRECTORY_SEPARATOR . time() .
'.' . $extension;
162 $form->setValuesByPost();
163 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
176 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
178 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
183 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
187 'sbm_id' =>
$row->sbm_id,
188 'title' =>
$row->sbm_title,
189 'link' =>
$row->sbm_link,
190 'activate' =>
$row->sbm_active
194 $form->setValuesByArray($dset);
195 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
202 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
204 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
207 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
208 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
217 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
219 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
222 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
223 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
232 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
234 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
240 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
243 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
246 $c_gui->setFormAction(
$ilCtrl->getFormAction($this,
"confirmDeleteSocialBookmarks"));
247 $c_gui->setHeaderText(
$lng->txt(
"socialbm_sure_delete_entry"));
248 $c_gui->setCancel(
$lng->txt(
"cancel"),
"editSocialBookmarks");
249 $c_gui->setConfirm(
$lng->txt(
"confirm"),
"confirmDeleteSocialBookmarks");
251 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
256 $c_gui->addItem(
"sbm_id[]", $id, $entry->sbm_title .
' (' . str_replace(
'{',
'{', $entry->sbm_link) .
')');
259 $this->tpl->setVariable(
'ADM_CONTENT', $c_gui->getHTML());
266 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
268 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
272 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
273 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
289 $has_write = $ilAccess->checkAccess(
'write',
'',$this->object->getRefId());
291 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
293 include_once
'./Services/Administration/classes/class.ilSocialBookmarks.php';
297 foreach($rset as $idx =>
$row)
301 'TITLE' =>
$row->sbm_title,
302 'LINK' => str_replace(
'{',
'{',
$row->sbm_link),
303 'ICON' =>
$row->sbm_icon,
309 $current_selection_list->setListTitle(
$lng->txt(
"actions"));
310 $current_selection_list->setId(
"act_".$counter++);
312 $ilCtrl->setParameter($this,
'sbm_id',
$row->sbm_id);
314 $current_selection_list->addItem(
$lng->txt(
"edit"),
'',
$ilCtrl->getLinkTarget($this,
"editSocialBookmark"));
315 $current_selection_list->addItem(
$lng->txt(
"delete"),
'',
$ilCtrl->getLinkTarget($this,
"deleteSocialBookmarks"));
318 if (
$row->sbm_active)
320 $current_selection_list->addItem(
$lng->txt(
"socialbm_disable"),
'', $toggle_action =
$ilCtrl->getLinkTarget($this,
"disableSocialBookmarks"));
324 $current_selection_list->addItem(
$lng->txt(
"socialbm_enable"),
'', $toggle_action =
$ilCtrl->getLinkTarget($this,
"enableSocialBookmarks"));
327 $ilCtrl->clearParameters($this);
330 $dset[$idx][
'ID'] =
$row->sbm_id;
331 $dset[$idx][
'ACTIONS'] = $current_selection_list->getHTML();
332 $dset[$idx][
'TOGGLE_LINK'] = $toggle_action;
333 $dset[$idx][
'ACTIVE'] =
$row->sbm_active ?
$lng->txt(
'enabled') :
$lng->txt(
'disabled');
337 $dset[$idx][
'ACTIVE_STATIC'] =
$row->sbm_active ?
$lng->txt(
'enabled') :
$lng->txt(
'disabled');
341 require_once
'Services/Table/classes/class.ilTable2GUI.php';
342 $table =
new ilTable2GUI($this,
'editSocialBookmarks');
343 $table->setFormName(
'smtable');
344 $table->setId(
'smtable');
345 $table->setPrefix(
'sm');
346 $table->setFormAction(
$ilCtrl->getFormAction($this,
'saveSocialBookmarks'));
349 $table->addColumn(
'',
'check',
'',
true);
351 $table->addColumn(
$lng->txt(
'icon'),
'');
352 $table->addColumn(
$lng->txt(
'title'),
'TITLE');
353 $table->addColumn(
$lng->txt(
'link'),
'LINK');
354 $table->addColumn(
$lng->txt(
'active'),
'ACTIVE');
357 $table->addColumn(
$lng->txt(
'actions'),
'');
359 $table->setTitle(
$lng->txt(
'bm_manage_social_bm'));
360 $table->setData($dset);
361 $table->setRowTemplate(
'tpl.social_bookmarking_row.html',
'Services/Administration');
363 $table->setDefaultOrderField(
"title");
364 $table->setDefaultOrderDirection(
"asc");
368 $table->addMultiCommand(
'enableSocialBookmarks',
$lng->txt(
'socialbm_enable'));
369 $table->addMultiCommand(
'disableSocialBookmarks',
$lng->txt(
'socialbm_disable'));
370 $table->addMultiCommand(
'deleteSocialBookmarks',
$lng->txt(
'delete'));
371 $table->setSelectAllCheckbox(
'sbm_id');
373 $table->addCommandButton(
'addSocialBookmark',
$lng->txt(
'create'));
376 $this->tpl->setVariable(
'ADM_CONTENT', $table->getHTML());
392 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
394 $form->setFormAction(
$ilCtrl->getFormAction($this));
395 $form->setTitle(
$lng->txt(
"mathjax_settings"));
400 $enable->setInfo(
$lng->txt(
"mathjax_enable_mathjax_info").
" <a target='blank' href='http://www.mathjax.org/'>MathJax</a>");
401 $form->addItem($enable);
404 $text_prop =
new ilTextInputGUI(
$lng->txt(
"mathjax_path_to_mathjax"),
"path_to_mathjax");
405 $text_prop->setInfo(
$lng->txt(
"mathjax_path_to_mathjax_desc"));
406 $text_prop->setValue($path_to_mathjax);
407 $text_prop->setRequired(
true);
408 $text_prop->setMaxLength(400);
409 $text_prop->setSize(100);
410 $enable->addSubItem($text_prop);
415 1 =>
'[tex]...[/tex]',
416 2 =>
'<span class="math">...</span>'
421 $si->setInfo($this->lng->txt(
"mathjax_limiter_info"));
422 $enable->addSubItem(
$si);
424 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
426 $form->addCommandButton(
"saveMathJax",
$lng->txt(
"save"));
429 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
439 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
451 $ilCtrl->redirect($this,
"editMathJax");
461 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
471 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
472 include_once(
"./Services/Form/classes/class.ilCheckboxOption.php");
474 $form->setFormAction(
$ilCtrl->getFormAction($this));
475 $form->setTitle(
$lng->txt(
"maps_settings"));
480 $enable->setInfo(
$lng->txt(
"maps_enable_maps_info"));
481 $form->addItem($enable);
486 $types->setValue($type);
487 $form->addItem($types);
490 if($type ==
"openlayers") {
494 $geolocation =
new ilTextInputGUI(
$lng->txt(
"maps_geolocation_server"),
"geolocation");
496 $geolocation->setInfo(
$lng->txt(
"maps_custom_geolocation_server_info"));
498 $form->addItem($tile);
499 $form->addItem($geolocation);
503 $key->setMaxLength(200);
505 $form->addItem($key);
512 $loc_prop->setLatitude($std_latitude);
513 $loc_prop->setLongitude($std_longitude);
514 $loc_prop->setZoom($std_zoom);
515 $form->addItem($loc_prop);
517 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
519 $form->addCommandButton(
"saveMaps",
$lng->txt(
"save"));
520 $form->addCommandButton(
"view",
$lng->txt(
"cancel"));
523 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
532 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
547 $ilCtrl->redirect($this,
"editMaps");
553 $maps = ($a_cmd ==
'editMaps') ?
true :
false;
554 $mathjax = ($a_cmd ==
'editMathJax') ?
true :
false;
555 $socialbookmarks = ($a_cmd ==
'editSocialBookmarks') ?
true :
false;
557 $this->tabs_gui->addSubTabTarget(
"maps_extt_maps", $this->ctrl->getLinkTarget($this,
"editMaps"),
559 $this->tabs_gui->addSubTabTarget(
"mathjax_mathjax", $this->ctrl->getLinkTarget($this,
"editMathJax"),
560 "",
"",
"", $mathjax);
561 $this->tabs_gui->addSubTabTarget(
"socialbm_extt_social_bookmarks", $this->ctrl->getLinkTarget($this,
"editSocialBookmarks"),
562 "",
"",
"", $socialbookmarks);
569 $next_class = $this->ctrl->getNextClass($this);
570 $cmd = $this->ctrl->getCmd();
573 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
575 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
580 case 'ilecssettingsgui':
581 $this->tabs_gui->setTabActive(
'ecs_server_settings');
582 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
586 case 'ilpermissiongui':
587 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
589 $ret =& $this->ctrl->forwardCommand($perm_gui);
590 $this->tabs_gui->setTabActive(
'perm_settings');
594 $this->tabs_gui->setTabActive(
'settings');
User interface class for advanced drop-down selection lists.
Confirmation screen class.
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
static getStdTileServers()
Returns the tile server to be used in the installation.
static setApiKey($a_api_key)
static setActivated($a_activated)
static setStdLatitude($a_lat)
static isActivated()
Checks whether Map feature is activated.
static setStdZoom($a_zoom)
static setStdGeolocationServer($a_geolocation)
static setStdLongitude($a_lon)
static getAvailableMapTypes()
Get a dict { $id => $name } for available maps services.
static setStdTileServers($a_tile)
Class ilObjectGUI Basic methods of all Output classes.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _insertSocialBookmark($title, $link, $active, $icon_path)
insert new social bookmark service
static _delete($id)
update a social bookmark service
static _deleteImage($id)
delete image of an service
static _setActive($id, $active=true)
update a social bookmark service
static _initForm($formhandlerObject, $mode="create", $id=0)
Init Social Bookmark edit/create Form.
static _updateSocialBookmark($id, $title, $link, $active, $icon_path=false)
update a social bookmark service
This class represents a text property in a property form.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static getWebspaceDir($mode="filesystem")
get webspace directory
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static createDirectory($a_dir, $a_mod=0755)
create directory
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options
if(strpos( $jquery_path, './')===0) else if(strpos($jquery_path, '.')===0) $mathJaxSetting