5 require_once
"./Services/Object/classes/class.ilObject2GUI.php";
6 include_once(
'./Modules/WebResource/classes/class.ilParameterAppender.php');
7 require_once
'Services/LinkChecker/interfaces/interface.ilLinkCheckerGUIRowHandling.php';
42 $ilTabs = $DIC[
'ilTabs'];
44 $ilAccess = $DIC[
'ilAccess'];
48 if (
$_GET[
"baseClass"] ==
'ilLinkResourceHandlerGUI') {
50 $ilCtrl->saveParameter($this,
'view_mode');
54 $this->lng->loadLanguageModule(
"webr");
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
59 switch ($next_class) {
60 case "ilinfoscreengui":
65 case 'ilobjectmetadatagui':
68 $ilTabs->activateTab(
'id_meta_data');
69 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
71 $this->ctrl->forwardCommand($md_gui);
74 case 'ilpermissiongui':
76 $ilTabs->activateTab(
'id_permissions');
77 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
79 $ret = &$this->ctrl->forwardCommand($perm_gui);
82 case 'ilobjectcopygui':
84 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
87 $this->ctrl->forwardCommand($cp);
92 $this->tabs_gui->setTabActive(
'export');
93 include_once
'./Services/Export/classes/class.ilExportGUI.php';
95 $exp->addFormat(
'xml');
96 $this->ctrl->forwardCommand($exp);
99 case "ilcommonactiondispatchergui":
102 $this->ctrl->forwardCommand($gui);
105 case "ilpropertyformgui":
106 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
108 $this->ctrl->forwardCommand($this->form);
111 case "ilinternallinkgui":
112 $this->lng->loadLanguageModule(
"content");
113 require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
115 $link_gui->filterLinkType(
"PageObject");
116 $link_gui->filterLinkType(
"GlossaryItem");
117 $link_gui->filterLinkType(
"RepositoryItem");
118 $link_gui->setFilterWhiteList(
true);
119 $ilCtrl->forwardCommand($link_gui);
124 $this->ctrl->setCmd(
"view");
126 parent::executeCommand();
131 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
164 $this->form->setValuesByPost();
165 $this->tpl->setContent($this->form->getHTML());
172 $this->link->setLinkResourceId($a_new_object->
getId());
173 $link_id = $this->link->add();
174 $this->link->updateValid(
true);
176 ilUtil::sendSuccess($this->lng->txt(
'webr_link_added'));
179 if ($this->id_type == self::WORKSPACE_NODE_ID) {
180 $this->ctrl->redirect($this,
"editLinks");
185 $a_new_object->
getRefId() .
"&cmd=switchViewMode&switch_mode=2");
198 $ilTabs = $DIC[
'ilTabs'];
201 $ilTabs->activateTab(
'id_settings');
204 $this->tpl->setContent($this->form->getHTML());
216 $ilTabs = $DIC[
'ilTabs'];
219 $ilTabs->activateTab(
'id_settings');
222 if ($this->form->checkInput()) {
223 $this->
object->setTitle($this->form->getInput(
'tit'));
224 $this->
object->setDescription($this->form->getInput(
'des'));
225 $this->
object->update();
227 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
233 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
236 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
237 $this->ctrl->redirect($this,
'settings');
240 $this->form->setValuesByPost();
242 $this->tpl->setContent($this->form->getHTML());
254 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
256 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
259 $this->form->setTitle($this->lng->txt(
'webr_edit_settings'));
262 $tit =
new ilTextInputGUI($this->lng->txt(
'webr_list_title'),
'tit');
263 $tit->setValue($this->object->getTitle());
264 $tit->setRequired(
true);
266 $tit->setMaxLength(127);
267 $this->form->addItem($tit);
271 $des->
setValue($this->object->getDescription());
274 $this->form->addItem($des);
277 $section->setTitle($this->lng->txt(
'obj_presentation'));
281 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
284 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
285 include_once
'./Services/Container/classes/class.ilContainer.php';
289 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
293 $this->lng->txt(
'webr_sort_title'),
296 $sor->addOption($opt);
299 $this->lng->txt(
'webr_sort_manual'),
302 $sor->addOption($opm);
303 $this->form->addItem($sor);
305 $this->form->
setTitle($this->lng->txt(
'obj_presentation'));
309 $tit->setValue($this->object->getTitle());
310 $this->form->addItem($tit);
314 $des->setValue($this->object->getDescription());
315 $this->form->addItem($des);
318 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
321 $this->form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
322 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
339 if (!(
int)
$_GET[
'link_id']) {
341 $ilCtrl->redirect($this,
'view');
346 $this->tpl->setContent($this->form->getHTML());
360 if ($this->
checkLinkInput(self::LINK_MOD_EDIT, $this->object->getId(), (int) $_REQUEST[
'link_id'])) {
361 $this->link->setLinkId((
int) $_REQUEST[
'link_id']);
362 $this->link->update();
364 $this->dynamic->add((
int) $_REQUEST[
'link_id']);
368 $this->
object->setTitle($this->form->getInput(
'tit'));
369 $this->
object->setDescription($this->form->getInput(
'des'));
370 $this->
object->update();
373 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
374 $ilCtrl->redirect($this,
'view');
377 $this->form->setValuesByPost();
378 $this->tpl->setContent($this->form->getHTML());
391 $this->tpl->setContent($this->form->getHTML());
407 if ($this->
checkLinkInput(self::LINK_MOD_ADD, $this->object->getId(), 0)) {
410 $this->
object->setTitle($this->form->getInput(
'lti'));
411 $this->
object->setDescription($this->form->getInput(
'tde'));
412 $this->
object->update();
416 $link_id = $this->link->add();
417 $this->link->updateValid(
true);
421 $this->dynamic->add($link_id);
423 ilUtil::sendSuccess($this->lng->txt(
'webr_link_added'),
true);
424 $ilCtrl->redirect($this,
'view');
428 $this->form->setValuesByPost();
431 $this->tpl->setContent($this->form->getHTML());
446 $this->ctrl->setParameter($this,
'link_id', (
int)
$_GET[
'link_id']);
448 if (!isset($_GET[
'param_id'])) {
450 $ilCtrl->redirect($this,
'view');
453 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
455 $param->delete((
int) $_GET[
'param_id']);
457 ilUtil::sendSuccess($this->lng->txt(
'links_parameter_deleted'),
true);
458 $ilCtrl->redirect($this,
'editLinks');
469 if (!isset(
$_GET[
'param_id'])) {
471 $ilCtrl->redirect($this,
'view');
474 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
478 ilUtil::sendSuccess($this->lng->txt(
'links_parameter_deleted'),
true);
479 $ilCtrl->redirect($this,
'view');
496 if (!is_array(
$_POST[
'ids'])) {
498 $ilCtrl->redirect($this,
'view');
503 foreach (
$_POST[
'ids'] as $link_id) {
507 if (
$_POST[
'tar_' . $link_id .
'_ajax_type'] &&
508 $_POST[
'tar_' . $link_id .
'_ajax_id']) {
510 $_POST[
'tar_' . $link_id .
'_ajax_type'] .
'|' .
511 $_POST[
'tar_' . $link_id .
'_ajax_id'];
515 if (!strlen(
$data[
'tit'])) {
516 $invalid[] = $link_id;
519 if (!strlen(
$data[
'tar'])) {
520 $invalid[] = $link_id;
524 $invalid[] = $link_id;
528 $invalid[] = $link_id;
533 if (count($invalid)) {
535 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_manage.html',
'Modules/WebResource');
537 include_once
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
539 $table->setInvalidLinks($invalid);
540 $table->parseSelectedLinks(
$_POST[
'ids']);
541 $table->updateFromPost();
542 $this->tpl->setVariable(
'TABLE_LINKS', $table->getHTML());
546 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
550 include_once
'./Services/Form/classes/class.ilFormPropertyGUI.php';
551 include_once
'./Services/Form/classes/class.ilLinkInputGUI.php';
552 foreach (
$_POST[
'ids'] as $link_id) {
557 $links->setLinkId($link_id);
561 $links->setActiveStatus((
int)
$data[
'act']);
562 $links->setDisableCheckStatus((
int) $data[
'che']);
563 $links->setLastCheckDate($orig[
'last_check']);
564 $links->setValidStatus((
int) $data[
'vali']);
568 if (strlen($data[
'nam']) and $data[
'val']) {
571 $param->setValue((
int) $data[
'val']);
578 $this->
object->update();
584 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
585 $ilCtrl->redirect($this,
'view');
595 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
598 $values = $link->
getItem($a_link_id);
603 $this->form->setValuesByArray(
605 'tit' => $values[
'title'],
606 'tar' => $values[
'target'],
607 'des' => $values[
'description'],
608 'act' => (
int) $values[
'active'],
609 'che' => (
int) $values[
'disable_check'],
610 'vali' => (
int) $values[
'valid']
625 $valid = $this->form->checkInput();
627 $link_input = $this->form->getInput(
'tar');
629 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
632 $this->link->setTitle($this->form->getInput(
'tit'));
633 $this->link->setDescription($this->form->getInput(
'des'));
634 $this->link->setDisableCheckStatus($this->form->getInput(
'che'));
637 if ($a_mode == self::LINK_MOD_CREATE) {
638 $this->link->setActiveStatus(
true);
640 $this->link->setActiveStatus($this->form->getInput(
'act'));
643 if ($a_mode == self::LINK_MOD_EDIT) {
644 $this->link->setValidStatus($this->form->getInput(
'vali'));
646 $this->link->setValidStatus(
true);
654 $this->dynamic->setName($this->form->getInput(
'nam'));
655 $this->dynamic->setValue($this->form->getInput(
'val'));
656 if (!$this->dynamic->validate()) {
657 switch ($this->dynamic->getErrorCode()) {
659 $this->form->getItemByPostVar(
'nam')->setAlert($this->lng->txt(
'links_no_name_given'));
663 $this->form->getItemByPostVar(
'val')->setAlert($this->lng->txt(
'links_no_value_given'));
670 $this->dynamic = null;
685 $ilTabs = $DIC[
'ilTabs'];
687 $ilTabs->activateTab(
"id_content");
689 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
693 case self::LINK_MOD_CREATE:
695 $this->ctrl->setParameter($this,
'new_type',
'webr');
696 $this->form->setTitle($this->lng->txt(
'webr_new_link'));
697 $this->form->setTableWidth(
'600px');
700 $this->form->addCommandButton(
'save', $this->lng->txt(
'webr_add'));
701 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
704 case self::LINK_MOD_ADD:
706 $this->form->setTitle($this->lng->txt(
'webr_new_link'));
709 $this->form->addCommandButton(
'saveAddLink', $this->lng->txt(
'webr_add'));
710 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
713 case self::LINK_MOD_EDIT:
715 $this->ctrl->setParameter($this,
'link_id', (
int) $_REQUEST[
'link_id']);
716 $this->form->setTitle($this->lng->txt(
'webr_edit'));
719 $this->form->addCommandButton(
'updateLink', $this->lng->txt(
'save'));
720 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
725 $this->form->setFormAction($this->ctrl->getFormAction($this));
731 $this->form->setTitle($this->lng->txt(
'webr_edit_list'));
734 $title =
new ilTextInputGUI($this->lng->txt(
'webr_list_title'),
'lti');
735 $title->setRequired(
true);
737 $title->setMaxLength(127);
738 $this->form->addItem($title);
744 $this->form->addItem($desc);
748 $sect->setTitle($this->lng->txt(
'webr_add'));
749 $this->form->addItem($sect);
760 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
761 $tar =
new ilLinkInputGUI($this->lng->txt(
'webr_link_target'),
'tar');
770 $tar->setExternalLinkMaxLength(1000);
771 $tar->setInternalLinkFilterTypes(array(
"PageObject",
"GlossaryItem",
"RepositoryItem"));
772 $tar->setRequired(
true);
773 $this->form->addItem($tar);
776 $tit =
new ilTextInputGUI($this->lng->txt(
'webr_link_title'),
'tit');
777 $tit->setRequired(
true);
779 $tit->setMaxLength(127);
780 $this->form->addItem($tit);
786 $this->form->addItem($des);
789 if ($a_mode != self::LINK_MOD_CREATE) {
794 $this->form->addItem($act);
799 $this->form->addItem($che);
803 if ($a_mode == self::LINK_MOD_EDIT) {
805 $this->form->addItem($val);
810 $dyn->
setInfo($this->lng->txt(
'links_dynamic_info'));
817 foreach ($links as $id => $link) {
820 $ptpl =
new ilTemplate(
'tpl.link_dyn_param_edit.html',
true,
true,
'Modules/WebResource');
822 $this->ctrl->setParameter($this,
'param_id', $id);
823 $ptpl->setVariable(
'LINK_DEL', $this->ctrl->getLinkTarget($this,
'deleteParameterForm'));
824 $ptpl->setVariable(
'LINK_TXT', $this->lng->txt(
'delete'));
825 $p->setHtml($ptpl->get());
826 $dyn->addSubItem($p);
833 if ($a_mode != self::LINK_MOD_CREATE) {
834 #$new = new ilCustomInputGUI($this->lng->txt('links_add_param'),''); 835 #$dyn->addSubItem($new); 841 $nam->setMaxLength(128);
842 $dyn->addSubItem($nam);
848 $dyn->addSubItem($val);
850 $this->form->addItem($dyn);
861 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
875 $_REQUEST[
'view_mode'] =
$_GET[
'view_mode'] = (int)
$_GET[
'switch_mode'];
885 $_GET[
'switch_mode'] = self::VIEW_MODE_MANAGE;
899 $ilTabs = $DIC[
'ilTabs'];
901 $ilTabs->activateTab(
"id_content");
905 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
909 switch ((
int) $_REQUEST[
'view_mode']) {
910 case self::VIEW_MODE_MANAGE:
914 case self::VIEW_MODE_SORT:
916 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
929 $GLOBALS[
'DIC'][
'tpl']->setPermanentLink($this->object->getType(), $this->
object->getRefId());
942 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_manage.html',
'Modules/WebResource');
945 include_once
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
949 include_once
'./Services/Link/classes/class.ilInternalLinkGUI.php';
952 $this->tpl->addJavaScript(
"Modules/WebResource/js/intLink.js");
953 $this->tpl->addJavascript(
"Services/Form/js/Form.js");
955 $this->tpl->setVariable(
'TABLE_LINKS', $table->getHTML() . $js);
967 include_once
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
971 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_view.html',
'Modules/WebResource');
973 $this->tpl->setVariable(
'LINK_TABLE', $table->getHTML());
985 include_once
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
989 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_view.html',
'Modules/WebResource');
991 $this->tpl->setVariable(
'LINK_TABLE', $table->getHTML());
1002 include_once
'./Services/Container/classes/class.ilContainerSorting.php';
1004 $sort->savePost((array)
$_POST[
'position']);
1006 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
1022 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
1024 $tool->setFormAction($this->ctrl->getFormAction($this));
1026 $this->lng->txt(
'webr_add'),
1027 $this->ctrl->getLinkTarget($this,
'addLink')
1030 $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
1043 $link_ids = array();
1045 if (is_array(
$_POST[
'link_ids'])) {
1046 $link_ids =
$_POST[
'link_ids'];
1047 } elseif (isset(
$_GET[
'link_id'])) {
1048 $link_ids = array(
$_GET[
'link_id']);
1051 if (!count($link_ids) > 0) {
1057 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1060 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1062 $confirm->setFormAction($this->ctrl->getFormAction($this,
'view'));
1063 $confirm->setHeaderText($this->lng->txt(
'webr_sure_delete_items'));
1064 $confirm->setConfirm($this->lng->txt(
'delete'),
'deleteLinks');
1065 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
1067 foreach ($link_ids as $link_id) {
1068 $link = $links->getItem($link_id);
1069 $confirm->addItem(
'link_ids[]', $link_id, $link[
'title']);
1071 $this->tpl->setContent($confirm->getHTML());
1086 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1089 foreach (
$_POST[
'link_ids'] as $link_id) {
1090 $links->
delete($link_id);
1092 ilUtil::sendSuccess($this->lng->txt(
'webr_deleted_items'),
true);
1093 $ilCtrl->redirect($this,
'view');
1108 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1111 if (!
$_GET[
'link_id']) {
1113 $ilCtrl->redirect($this,
'view');
1116 $links->setLinkId((
int)
$_GET[
'link_id']);
1117 $links->updateActive(
false);
1119 ilUtil::sendSuccess($this->lng->txt(
'webr_inactive_success'),
true);
1120 $ilCtrl->redirect($this,
'view');
1131 $this->ctrl->setCmd(
"showSummary");
1132 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1143 $ilTabs = $DIC[
'ilTabs'];
1148 $ilTabs->activateTab(
'id_info');
1150 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1153 $info->enablePrivateNotes();
1156 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
1158 if ($this->id_type == self::WORKSPACE_NODE_ID) {
1163 $this->ctrl->forwardCommand($info);
1171 $ilTabs = $DIC[
'ilTabs'];
1174 $ilTabs->activateTab(
'id_history');
1176 include_once(
"./Services/History/classes/class.ilHistoryTableGUI.php");
1177 $hist_gui =
new ilHistoryTableGUI($this,
"history", $this->object->getId(), $this->
object->getType);
1179 $this->tpl->setContent($hist_gui->getHTML());
1192 $this->
object->items_obj->readItem($row[
'page_id']);
1193 $row[
'title'] = $this->
object->items_obj->getTitle();
1195 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
1197 $actions->setSelectionHeaderClass(
'small');
1198 $actions->setItemLinkClass(
'xsmall');
1199 $actions->setListTitle($this->lng->txt(
'actions'));
1201 $this->ctrl->setParameter($this,
'link_id', $row[
'page_id']);
1203 $this->lng->txt(
'edit'),
1205 $this->ctrl->getLinkTarget($this,
'editLink')
1207 $this->ctrl->clearParameters($this);
1208 $row[
'action_html'] =
$actions->getHTML();
1221 $ilias = $DIC[
'ilias'];
1224 $ilTabs = $DIC[
'ilTabs'];
1227 $ilTabs->activateTab(
'id_link_check');
1230 $this->
object->initLinkResourceItemsObject();
1232 require_once
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
1236 if ((
bool) $ilias->getSetting(
'cron_web_resource_check')) {
1237 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1238 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
1240 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
1243 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
1246 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
1247 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
1251 $tgui->setLinkChecker($this->link_checker_obj)
1252 ->setRowHandler($this)
1253 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
1255 return $tpl->setContent($tgui->prepareHTML()->getHTML() .
$toolbar->getHTML());
1262 $ilDB = $DIC[
'ilDB'];
1265 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1268 $link_check_notify->setUserId(
$ilUser->getId());
1269 $link_check_notify->setObjId($this->object->getId());
1271 if (
$_POST[
'link_check_message']) {
1272 ilUtil::sendSuccess($this->lng->txt(
'link_check_message_enabled'));
1273 $link_check_notify->addNotifier();
1275 ilUtil::sendSuccess($this->lng->txt(
'link_check_message_disabled'));
1276 $link_check_notify->deleteNotifier();
1288 $this->
object->initLinkResourceItemsObject();
1291 $this->
object->items_obj->updateValidByCheck();
1293 foreach ($this->link_checker_obj->checkWebResourceLinks() as $invalid) {
1294 $this->
object->items_obj->readItem($invalid[
'page_id']);
1295 $this->
object->items_obj->setActiveStatus(
false);
1296 $this->
object->items_obj->setValidStatus(
false);
1297 $this->
object->items_obj->update(
false);
1300 $this->
object->items_obj->updateLastCheck();
1301 ilUtil::sendSuccess($this->lng->txt(
'link_checker_refreshed'));
1312 $ilDB = $DIC[
'ilDB'];
1314 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
1317 $this->link_checker_obj->setObjId($this->object->getId());
1334 $ilTabs = $DIC[
'ilTabs'];
1337 switch ($a_active_tab) {
1340 $this->lng->loadLanguageModule(
'cntr');
1342 $this->ctrl->setParameter($this,
'switch_mode', self::VIEW_MODE_VIEW);
1346 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1348 $this->ctrl->setParameter($this,
'switch_mode', self::VIEW_MODE_MANAGE);
1350 'id_content_manage',
1351 $lng->txt(
'cntr_manage'),
1352 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1354 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1355 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
1356 include_once
'./Services/Container/classes/class.ilContainer.php';
1359 $this->ctrl->setParameter($this,
'switch_mode', self::VIEW_MODE_SORT);
1361 'id_content_ordering',
1362 $this->lng->txt(
'cntr_ordering'),
1363 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1367 $ilCtrl->clearParameters($this);
1368 $ilTabs->activateSubTab($a_active_subtab);
1372 $ilTabs->activateTab(
'id_content');
1384 $ilTabs = $DIC[
'ilTabs'];
1386 $ilHelp = $DIC[
'ilHelp'];
1388 $ilHelp->setScreenIdComponent(
"webr");
1393 $lng->txt(
"content"),
1394 $this->ctrl->getLinkTarget($this,
"view")
1404 $lng->txt(
"info_short"),
1405 $this->ctrl->getLinkTarget($this,
"infoScreen")
1412 $lng->txt(
"settings"),
1413 $this->ctrl->getLinkTarget($this,
"settings")
1420 $lng->txt(
"history"),
1421 $this->ctrl->getLinkTarget($this,
"history")
1429 $lng->txt(
"link_check"),
1430 $this->ctrl->getLinkTarget($this,
"linkChecker")
1435 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
1437 $mdtab = $mdgui->getTab();
1441 $lng->txt(
"meta_data"),
1450 $this->lng->txt(
'export'),
1451 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
'')
1466 $this->tpl->setLocator();
1469 if ($this->message) {
1482 $ilLocator = $DIC[
'ilLocator'];
1484 if (is_object($this->
object)) {
1485 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this),
"", $this->
object->getRefId(),
"webr");
1492 include_once
"Services/Form/classes/class.ilFormPropertyGUI.php";
1493 include_once
"Services/Form/classes/class.ilLinkInputGUI.php";
1496 include_once(
"./Services/Link/classes/class.ilLink.php");
1499 $parts = explode(
"|", $a_target);
1501 if ($parts[0] ==
'wpage') {
1506 '&target=wiki_wpage_' . $parts[1]
1510 if ($parts[0] ==
"term") {
1516 "&target=git_" . $parts[1]
1520 if ($parts[0] ==
"page") {
1532 $obj_id = $this->
object->getId();
1534 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1537 if (
$url[
"target"]) {
1540 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
1552 if ($_REQUEST[
"link_id"]) {
1553 $obj_id = $this->
object->getId();
1555 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1557 $item = $items->getItem($_REQUEST[
"link_id"]);
1558 if ($item[
"target"]) {
1561 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
1578 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1596 $tpl =
new ilTemplate(
"tpl.export_html.html",
true,
true,
"Modules/WebResource");
1598 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1600 foreach ($items->getAllItems() as $item) {
1601 if (!$item[
"active"]) {
1607 $tpl->setCurrentBlock(
"link_bl");
1608 $tpl->setVariable(
"LINK_URL", $target);
1609 $tpl->setVariable(
"LINK_TITLE", $item[
"title"]);
1610 $tpl->setVariable(
"LINK_DESC", $item[
"description"]);
1611 $tpl->setVariable(
"LINK_CREATE", $item[
"create_date"]);
1612 $tpl->setVariable(
"LINK_UPDATE", $item[
"last_update"]);
1613 $tpl->parseCurrentBlock();
1616 $tpl->setVariable(
"CREATE_DATE", $this->object->getCreateDate());
1617 $tpl->setVariable(
"LAST_UPDATE", $this->object->getLastUpdateDate());
1618 $tpl->setVariable(
"TXT_TITLE", $this->object->getTitle());
1619 $tpl->setVariable(
"TXT_DESC", $this->object->getLongDescription());
1621 $tpl->setVariable(
"INST_ID", (
$ilSetting->get(
'short_inst_name') !=
"")
1628 public static function _goto($a_target, $a_additional = null)
1632 $ilAccess = $DIC[
'ilAccess'];
1636 if ($a_additional && substr($a_additional, -3) ==
"wsp") {
1637 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
1638 $_GET[
"wsp_id"] = $a_target;
1639 include(
"ilias.php");
1644 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1645 ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=$a_target");
1648 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1649 ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target .
"&cmd=infoScreen");
1651 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1653 $lng->txt(
"msg_no_perm_read_item"),
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
This class represents an option in a radio group.
setTitle($a_title)
Set Title.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static _isSingular($a_webr_id)
Check whether there is only one active link in the web resource.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
TableGUI class for search results.
settings()
Edit settings Title, Description, Sorting.
updateLink()
Save after editing.
setSortMode($a_mode)
set sort mode
initCreateForm($a_new_type)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
saveSorting()
Save nmanual sorting.
TableGUI class for search results.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _getOptionSelect()
Get options as array.
setInfo($a_info)
Set Information Text.
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
getPermanentLinkWidget($a_append=null, $a_center=false)
setValue($a_value)
Set Value.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
Class ilObjLinkResourceGUI.
addLink()
Add an additional link.
static _lookupTitle($a_id)
lookup object title
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
deactivateLink()
Deactivate links.
infoScreenForward()
show information screen
class for checking external links in page objects.
initFormSettings()
Show settings form.
linkChecker()
Show link validation.
afterSave(ilObject $a_new_object)
showLinks()
Show all active links.
class ilLinkCheckerTableGUI
static _append($a_link_data)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export User Interface Class.
static parameterToInfo($a_name, $a_value)
Get info text describing an existing dynamic link.
getId()
get object id public
switchViewMode()
Switch between "View" "Manage" and "Sort".
editLinks()
Start with manage mode.
static _lookupObjId($a_id)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static lookupItem($a_webr_id, $a_link_id)
static infoPanel($a_keep=true)
editLink()
Edit a single link.
interface ilLinkCheckerGUIRowHandling
deleteParameter()
Delete a dynamic parameter.
formatInvalidLinkArray(array $row)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
setValuesFromLink($a_link_id)
Set form values from link.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveSettings()
Save container settings.
static _getFirstLink($a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24.10.14 Time: 10:35.
static _getNotifyStatus($a_usr_id, $a_obj_id)
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
This class represents a non editable value in a property form.
setRows($a_rows)
Set Rows.
This class represents a text area property in a property form.
deleteLinks()
Delete links.
Class ilObjLinkResourceGUI.
getRefId()
get reference id public
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilParameterAppender.
handleSubItemLinks($a_target)
const LINKS_ERR_NO_NAME_VALUE
static _goto($a_target, $a_additional=null)
static getLogger($a_component_id)
Get component logger.
static _lookupSortMode($a_obj_id)
lookup sort mode
delete($a_item_id, $a_update_history=true)
redirectToLink($a_ref_id, $a_obj_id, $a_url)
saveAddLink()
Save form data.
static _getInstance($a_obj_id)
get instance by obj_id
initFormLink($a_mode)
Show create/edit single link.
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
static redirect($a_script)
updateLinks()
Update all visible links.
save()
Save new object public.
static _getParams($a_link_id)
Get dynamic parameter definitions.
static _isEnabled()
Check if dynamic parameters are enabled.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
showToolbar($a_tpl_var)
Show toolbar.
Confirmation screen class.
confirmDeleteLink()
Show delete confirmation screen.