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';
43 if(
$_GET[
"baseClass"] ==
'ilLinkResourceHandlerGUI')
46 $ilCtrl->saveParameter($this,
'view_mode');
50 $this->lng->loadLanguageModule(
"webr");
52 $next_class = $this->ctrl->getNextClass($this);
53 $cmd = $this->ctrl->getCmd();
57 case "ilinfoscreengui":
62 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
64 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
68 $ilTabs->activateTab(
'id_meta_data');
69 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
70 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
71 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
72 $this->ctrl->forwardCommand($md_gui);
75 case 'ilpermissiongui':
77 $ilTabs->activateTab(
'id_permissions');
78 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
80 $ret =& $this->ctrl->forwardCommand($perm_gui);
83 case 'ilobjectcopygui':
85 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
88 $this->ctrl->forwardCommand($cp);
93 $this->tabs_gui->setTabActive(
'export');
94 include_once
'./Services/Export/classes/class.ilExportGUI.php';
96 $exp->addFormat(
'xml');
97 $this->ctrl->forwardCommand($exp);
100 case "ilcommonactiondispatchergui":
101 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
103 $this->ctrl->forwardCommand($gui);
106 case "ilpropertyformgui":
107 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
109 $this->ctrl->forwardCommand($this->form);
112 case "ilinternallinkgui":
113 $this->lng->loadLanguageModule(
"content");
114 require_once(
"./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
116 $link_gui->filterLinkType(
"PageObject");
117 $link_gui->filterLinkType(
"GlossaryItem");
118 $link_gui->filterLinkType(
"RepositoryItem");
119 $link_gui->setFilterWhiteList(
true);
120 $link_gui->setMode(
"asynch");
121 $ilCtrl->forwardCommand($link_gui);
127 $this->ctrl->setCmd(
"view");
135 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
169 $this->form->setValuesByPost();
170 $this->tpl->setContent($this->form->getHTML());
177 $this->link->setLinkResourceId($a_new_object->
getId());
178 $link_id = $this->link->add();
179 $this->link->updateValid(
true);
184 if($this->id_type == self::WORKSPACE_NODE_ID)
186 $this->ctrl->redirect($this,
"editLinks");
192 $a_new_object->
getRefId().
"&cmd=switchViewMode&switch_mode=2");
206 $ilTabs->activateTab(
'id_settings');
209 $this->tpl->setContent($this->form->getHTML());
221 $ilTabs->activateTab(
'id_settings');
224 if($this->form->checkInput())
226 $this->
object->setTitle($this->form->getInput(
'tit'));
227 $this->
object->setDescription($this->form->getInput(
'des'));
228 $this->
object->update();
230 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
236 $this->ctrl->redirect($this,
'settings');
239 $this->form->setValuesByPost();
241 $this->tpl->setContent($this->form->getHTML());
251 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
253 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
254 $this->form->setTitle($this->lng->txt(
'webr_edit_settings'));
257 $tit =
new ilTextInputGUI($this->lng->txt(
'webr_list_title'),
'tit');
258 $tit->
setValue($this->object->getTitle());
259 $tit->setRequired(
true);
261 $tit->setMaxLength(127);
262 $this->form->addItem($tit);
266 $des->
setValue($this->object->getDescription());
269 $this->form->addItem($des);
272 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
273 include_once
'./Services/Container/classes/class.ilContainer.php';
277 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
281 $this->lng->txt(
'webr_sort_title'),
284 $sor->addOption($opt);
287 $this->lng->txt(
'webr_sort_manual'),
290 $sor->addOption($opm);
291 $this->form->addItem($sor);
293 $this->form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
294 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
309 if(!(
int)
$_GET[
'link_id'])
312 $ilCtrl->redirect($this,
'view');
317 $this->tpl->setContent($this->form->getHTML());
331 $this->link->setLinkId((
int)
$_REQUEST[
'link_id']);
332 $this->link->update();
335 $this->dynamic->add((
int) $_REQUEST[
'link_id']);
340 $this->
object->setTitle($this->form->getInput(
'tit'));
341 $this->
object->setDescription($this->form->getInput(
'des'));
342 $this->
object->update();
346 $ilCtrl->redirect($this,
'view');
349 $this->form->setValuesByPost();
350 $this->tpl->setContent($this->form->getHTML());
363 $this->tpl->setContent($this->form->getHTML());
377 if($this->
checkLinkInput(self::LINK_MOD_ADD,$this->object->getId(),0))
382 $this->
object->setTitle($this->form->getInput(
'lti'));
383 $this->
object->setDescription($this->form->getInput(
'tde'));
384 $this->
object->update();
388 $link_id = $this->link->add();
389 $this->link->updateValid(
true);
394 $this->dynamic->add($link_id);
397 $ilCtrl->redirect($this,
'view');
401 $this->form->setValuesByPost();
404 $this->tpl->setContent($this->form->getHTML());
417 $this->ctrl->setParameter($this,
'link_id',(
int)
$_GET[
'link_id']);
419 if(!isset($_GET[
'param_id']))
422 $ilCtrl->redirect($this,
'view');
425 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
427 $param->
delete((
int) $_GET[
'param_id']);
430 $ilCtrl->redirect($this,
'editLinks');
439 if(!isset(
$_GET[
'param_id']))
442 $ilCtrl->redirect($this,
'view');
445 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
450 $ilCtrl->redirect($this,
'view');
466 if(!is_array(
$_POST[
'ids']))
469 $ilCtrl->redirect($this,
'view');
474 foreach(
$_POST[
'ids'] as $link_id)
479 if(
$_POST[
'tar_'.$link_id.
'_ajax_type'] &&
480 $_POST[
'tar_'.$link_id.
'_ajax_id'])
483 $_POST[
'tar_'.$link_id.
'_ajax_type'].
'|'.
484 $_POST[
'tar_'.$link_id.
'_ajax_id'];
488 if(!strlen(
$data[
'tit']))
490 $invalid[] = $link_id;
493 if(!strlen(
$data[
'tar']))
495 $invalid[] = $link_id;
500 $invalid[] = $link_id;
505 $invalid[] = $link_id;
513 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_manage.html',
'Modules/WebResource');
515 include_once
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
517 $table->setInvalidLinks($invalid);
518 $table->parseSelectedLinks(
$_POST[
'ids']);
519 $table->updateFromPost();
520 $this->tpl->setVariable(
'TABLE_LINKS',$table->getHTML());
524 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
528 foreach(
$_POST[
'ids'] as $link_id)
532 $links->setLinkId($link_id);
536 $links->setActiveStatus((
int)
$data[
'act']);
537 $links->setDisableCheckStatus((
int) $data[
'che']);
538 $links->setValidStatus((
int) $data[
'vali']);
541 if(strlen($data[
'nam']) and $data[
'val'])
545 $param->setValue((
int) $data[
'val']);
546 $param->add($link_id);
553 $this->
object->update();
560 $ilCtrl->redirect($this,
'view');
570 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
573 $values = $link->
getItem($a_link_id);
579 $this->form->setValuesByArray(
581 'tit' => $values[
'title'],
582 'tar' => $values[
'target'],
583 'des' => $values[
'description'],
584 'act' => (
int) $values[
'active'],
585 'che' => (
int) $values[
'disable_check'],
586 'vali' => (
int) $values[
'valid']
601 $valid = $this->form->checkInput();
603 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
605 $this->link->setTarget(str_replace(
'"',
'',
ilUtil::stripSlashes($this->form->getInput(
'tar'))));
606 $this->link->setTitle($this->form->getInput(
'tit'));
607 $this->link->setDescription($this->form->getInput(
'des'));
608 $this->link->setDisableCheckStatus($this->form->getInput(
'che'));
610 if($a_mode == self::LINK_MOD_CREATE)
612 $this->link->setActiveStatus(
true);
616 $this->link->setActiveStatus($this->form->getInput(
'act'));
619 if($a_mode == self::LINK_MOD_EDIT)
621 $this->link->setValidStatus($this->form->getInput(
'vali'));
625 $this->link->setValidStatus(
true);
634 $this->dynamic->setName($this->form->getInput(
'nam'));
635 $this->dynamic->setValue($this->form->getInput(
'val'));
636 if(!$this->dynamic->validate())
638 switch($this->dynamic->getErrorCode())
641 $this->form->getItemByPostVar(
'nam')->setAlert($this->lng->txt(
'links_no_name_given'));
645 $this->form->getItemByPostVar(
'val')->setAlert($this->lng->txt(
'links_no_value_given'));
652 $this->dynamic = null;
667 $ilTabs->activateTab(
"id_content");
669 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
674 case self::LINK_MOD_CREATE:
676 $this->ctrl->setParameter($this,
'new_type',
'webr');
677 $this->form->setTitle($this->lng->txt(
'webr_new_link'));
678 $this->form->setTableWidth(
'600px');
681 $this->form->addCommandButton(
'save', $this->lng->txt(
'webr_add'));
682 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
685 case self::LINK_MOD_ADD:
687 $this->form->setTitle($this->lng->txt(
'webr_new_link'));
690 $this->form->addCommandButton(
'saveAddLink', $this->lng->txt(
'webr_add'));
691 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
694 case self::LINK_MOD_EDIT:
696 $this->ctrl->setParameter($this,
'link_id',(
int)
$_REQUEST[
'link_id']);
697 $this->form->setTitle($this->lng->txt(
'webr_edit'));
700 $this->form->addCommandButton(
'updateLink', $this->lng->txt(
'save'));
701 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
706 $this->form->setFormAction($this->ctrl->getFormAction($this));
713 $this->form->setTitle($this->lng->txt(
'webr_edit_list'));
717 $title->setRequired(
true);
719 $title->setMaxLength(127);
720 $this->form->addItem(
$title);
726 $this->form->addItem($desc);
730 $sect->setTitle($this->lng->txt(
'webr_add'));
731 $this->form->addItem($sect);
742 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
743 $tar =
new ilLinkInputGUI($this->lng->txt(
'webr_link_target'),
'tar');
746 $tar->setRequired(
true);
747 $this->form->addItem($tar);
750 $tit =
new ilTextInputGUI($this->lng->txt(
'webr_link_title'),
'tit');
753 $tit->setMaxLength(127);
754 $this->form->addItem($tit);
760 $this->form->addItem($des);
763 if($a_mode != self::LINK_MOD_CREATE)
769 $this->form->addItem($act);
774 $this->form->addItem($che);
778 if($a_mode == self::LINK_MOD_EDIT)
781 $this->form->addItem($val);
787 $dyn->
setInfo($this->lng->txt(
'links_dynamic_info'));
795 foreach($links as $id => $link)
799 $ptpl =
new ilTemplate(
'tpl.link_dyn_param_edit.html',
true,
true,
'Modules/WebResource');
801 $this->ctrl->setParameter($this,
'param_id',$id);
802 $ptpl->setVariable(
'LINK_DEL',$this->ctrl->getLinkTarget($this,
'deleteParameterForm'));
803 $ptpl->setVariable(
'LINK_TXT',$this->lng->txt(
'delete'));
804 $p->setHtml($ptpl->get());
805 $dyn->addSubItem($p);
812 if($a_mode != self::LINK_MOD_CREATE)
814 #$new = new ilCustomInputGUI($this->lng->txt('links_add_param'),'');
815 #$dyn->addSubItem($new);
821 $nam->setMaxLength(128);
822 $dyn->addSubItem($nam);
828 $dyn->addSubItem($val);
830 $this->form->addItem($dyn);
841 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
876 $ilTabs->activateTab(
"id_content");
880 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
889 case self::VIEW_MODE_MANAGE:
893 case self::VIEW_MODE_SORT:
914 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_manage.html',
'Modules/WebResource');
917 include_once
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
921 include_once
'./Modules/LearningModule/classes/class.ilInternalLinkGUI.php';
924 $this->tpl->addJavaScript(
"Modules/WebResource/js/intLink.js");
925 $this->tpl->addJavascript(
"Services/Form/js/Form.js");
927 $this->tpl->setVariable(
'TABLE_LINKS',$table->getHTML().$js);
939 include_once
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
943 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_view.html',
'Modules/WebResource');
945 $this->tpl->setVariable(
'LINK_TABLE',$table->getHTML());
957 include_once
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
961 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_view.html',
'Modules/WebResource');
963 $this->tpl->setVariable(
'LINK_TABLE',$table->getHTML());
974 include_once
'./Services/Container/classes/class.ilContainerSorting.php';
976 $sort->savePost((array)
$_POST[
'position']);
995 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
997 $tool->setFormAction($this->ctrl->getFormAction($this));
999 $this->lng->txt(
'webr_add'),
1000 $this->ctrl->getLinkTarget($this,
'addLink')
1003 $this->tpl->setVariable($a_tpl_var,$tool->getHTML());
1016 $link_ids = array();
1018 if(is_array(
$_POST[
'link_ids']))
1020 $link_ids =
$_POST[
'link_ids'];
1022 elseif(isset(
$_GET[
'link_id']))
1024 $link_ids = array(
$_GET[
'link_id']);
1027 if(!count($link_ids) > 0)
1034 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1037 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1039 $confirm->setFormAction($this->ctrl->getFormAction($this,
'view'));
1040 $confirm->setHeaderText($this->lng->txt(
'webr_sure_delete_items'));
1041 $confirm->setConfirm($this->lng->txt(
'delete'),
'deleteLinks');
1042 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
1044 foreach($link_ids as $link_id)
1046 $link = $links->getItem($link_id);
1047 $confirm->addItem(
'link_ids[]', $link_id,$link[
'title']);
1049 $this->tpl->setContent($confirm->getHTML());
1062 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1065 foreach(
$_POST[
'link_ids'] as $link_id)
1067 $links->
delete($link_id);
1070 $ilCtrl->redirect($this,
'view');
1083 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1086 if(!
$_GET[
'link_id'])
1089 $ilCtrl->redirect($this,
'view');
1092 $links->setLinkId((
int)
$_GET[
'link_id']);
1093 $links->updateActive(
false);
1096 $ilCtrl->redirect($this,
'view');
1107 $this->ctrl->setCmd(
"showSummary");
1108 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1120 $ilTabs->activateTab(
'id_info');
1122 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1125 $info->enablePrivateNotes();
1128 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
1130 if($this->id_type == self::WORKSPACE_NODE_ID)
1136 $this->ctrl->forwardCommand($info);
1145 $ilTabs->activateTab(
'id_history');
1147 include_once(
"./Services/History/classes/class.ilHistoryGUI.php");
1153 "cmdClass" =>
$_GET[
"cmdClass"],
1154 "cmdNode" =>
$_GET[
"cmdNode"]));
1156 $this->tpl->setVariable(
"ADM_CONTENT", $hist_html);
1169 $this->
object->items_obj->readItem($row[
'page_id']);
1170 $row[
'title'] = $this->
object->items_obj->getTitle();
1172 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
1174 $actions->setSelectionHeaderClass(
'small');
1175 $actions->setItemLinkClass(
'xsmall');
1176 $actions->setListTitle($this->lng->txt(
'actions'));
1178 $this->ctrl->setParameter($this,
'link_id', $row[
'page_id']);
1180 $this->lng->txt(
'edit'),
1182 $this->ctrl->getLinkTarget($this,
'editLink')
1184 $this->ctrl->clearParameters($this);
1185 $row[
'action_html'] =
$actions->getHTML();
1199 $ilTabs->activateTab(
'id_link_check');
1202 $this->
object->initLinkResourceItemsObject();
1204 require_once
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
1208 if((
bool)$ilias->getSetting(
'cron_web_resource_check'))
1210 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1211 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
1213 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
1216 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
1218 $toolbar->addInputItem($chb);
1219 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
1220 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
1224 $tgui->setLinkChecker($this->link_checker_obj)
1225 ->setRowHandler($this)
1226 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
1228 return $tpl->setContent($tgui->prepareHTML()->getHTML().$toolbar->getHTML());
1235 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1238 $link_check_notify->setUserId($ilUser->getId());
1239 $link_check_notify->setObjId($this->object->getId());
1241 if(
$_POST[
'link_check_message'])
1244 $link_check_notify->addNotifier();
1249 $link_check_notify->deleteNotifier();
1262 if(!$this->link_checker_obj->checkPear())
1271 $this->
object->initLinkResourceItemsObject();
1274 $this->
object->items_obj->updateValidByCheck();
1276 foreach($this->link_checker_obj->checkWebResourceLinks() as $invalid)
1278 $this->
object->items_obj->readItem($invalid[
'page_id']);
1279 $this->
object->items_obj->setActiveStatus(
false);
1280 $this->
object->items_obj->setValidStatus(
false);
1281 $this->
object->items_obj->update(
false);
1284 $this->
object->items_obj->updateLastCheck();
1296 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
1299 $this->link_checker_obj->setObjId($this->object->getId());
1315 switch($a_active_tab)
1320 $this->lng->loadLanguageModule(
'cntr');
1322 $this->ctrl->setParameter($this,
'switch_mode',self::VIEW_MODE_VIEW);
1323 $ilTabs->addSubTab(
'id_content_view',
1325 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1327 $this->ctrl->setParameter($this,
'switch_mode',self::VIEW_MODE_MANAGE);
1328 $ilTabs->addSubTab(
'id_content_manage',
1329 $lng->txt(
'cntr_manage'),
1330 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1332 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1333 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
1334 include_once
'./Services/Container/classes/class.ilContainer.php';
1338 $this->ctrl->setParameter($this,
'switch_mode',self::VIEW_MODE_SORT);
1339 $ilTabs->addSubTab(
'id_content_ordering',
1340 $this->lng->txt(
'cntr_ordering'),
1341 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1345 $ilCtrl->clearParameters($this);
1346 $ilTabs->activateSubTab($a_active_subtab);
1350 $ilTabs->activateTab(
'id_content');
1360 global $ilTabs,
$lng, $ilHelp;
1362 $ilHelp->setScreenIdComponent(
"webr");
1366 $ilTabs->addTab(
"id_content",
1367 $lng->txt(
"content"),
1368 $this->ctrl->getLinkTarget($this,
"view"));
1373 $ilTabs->addTab(
"id_info",
1374 $lng->txt(
"info_short"),
1375 $this->ctrl->getLinkTarget($this,
"infoScreen"));
1380 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1383 $ilTabs->addTab(
"id_settings",
1384 $lng->txt(
"settings"),
1385 $this->ctrl->getLinkTarget($this,
"settings"));
1392 $ilTabs->addTab(
"id_history",
1393 $lng->txt(
"history"),
1394 $this->ctrl->getLinkTarget($this,
"history"));
1400 if(@include_once(
'HTTP/Request.php'))
1402 $ilTabs->addTab(
"id_link_check",
1403 $lng->txt(
"link_check"),
1404 $this->ctrl->getLinkTarget($this,
"linkChecker"));
1410 $ilTabs->addTab(
"id_meta_data",
1411 $lng->txt(
"meta_data"),
1412 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
'listSection'));
1419 $this->lng->txt(
'export'),
1420 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
'')
1432 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
1433 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1453 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
1460 foreach ($tree->getPathFull($this->object->getRefId()) as $key =>
$row)
1470 $this->tpl->touchBlock(
'locator_separator_prefix');
1473 if (
$row[
"child"] > 0)
1475 $this->tpl->setCurrentBlock(
"locator_img");
1476 $this->tpl->setVariable(
"IMG_SRC",
1478 $this->tpl->setVariable(
"IMG_ALT",
1479 $lng->txt(
"obj_".$type));
1480 $this->tpl->parseCurrentBlock();
1483 $this->tpl->setCurrentBlock(
"locator_item");
1485 if(
$row[
"type"] ==
'webr')
1487 $this->tpl->setVariable(
"ITEM",$this->object->getTitle());
1488 $this->tpl->setVariable(
"LINK_ITEM",$this->ctrl->getLinkTarget($this));
1490 elseif (
$row[
"child"] != $tree->getRootId())
1492 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$row[
"child"]);
1493 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
1494 $this->tpl->setVariable(
"LINK_ITEM",
1495 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
1499 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$row[
"child"]);
1500 $this->tpl->setVariable(
"ITEM", $this->lng->txt(
"repository"));
1501 $this->tpl->setVariable(
"LINK_ITEM",
1502 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
1504 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1506 $this->tpl->parseCurrentBlock();
1509 $this->tpl->setVariable(
"TXT_LOCATOR",$this->lng->txt(
"locator"));
1510 $this->tpl->parseCurrentBlock();
1515 $obj_id = $this->
object->getId();
1518 include_once(
"./Services/Link/classes/class.ilLink.php");
1519 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1525 include_once
"Services/Form/classes/class.ilFormPropertyGUI.php";
1526 include_once
"Services/Form/classes/class.ilLinkInputGUI.php";
1530 $parts = explode(
"|", $url[
"target"]);
1531 if ($parts[0] ==
"page")
1535 if ($parts[0] ==
"term")
1542 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
1556 $obj_id = $this->
object->getId();
1558 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1560 $item = $items->getItem(
$_REQUEST[
"link_id"]);
1564 include_once
"Services/Form/classes/class.ilFormPropertyGUI.php";
1565 include_once
"Services/Form/classes/class.ilLinkInputGUI.php";
1568 $parts = explode(
"|", $item[
"target"]);
1569 if ($parts[0] ==
"page")
1573 include_once(
"./Services/Link/classes/class.ilLink.php");
1575 if ($parts[0] ==
"term")
1582 "&target=git_".$parts[1]);
1585 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
1602 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1610 function _goto($a_target, $a_additional = null)
1614 if($a_additional && substr($a_additional, -3) ==
"wsp")
1616 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
1617 $_GET[
"wsp_id"] = $a_target;
1618 include(
"ilias.php");
1623 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1625 ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=$a_target");
1630 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1632 ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=".$a_target.
"&cmd=infoScreen");
1636 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1645 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);