4 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
5 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
34 $lng->loadLanguageModule(
"link");
37 if ((
$_SESSION[
"il_link_cont_obj"] !=
"" && !$tree->isInTree(
$_SESSION[
"il_link_cont_obj"])) ||
38 (
$_SESSION[
"il_link_glossary"] !=
"" && !$tree->isInTree(
$_SESSION[
"il_link_glossary"])) ||
48 $this->ctrl->saveParameter($this, array(
"linkmode",
"target_type"));
49 $this->default_type = $a_default_type;
50 $this->default_obj = $a_default_obj;
51 $this->filter_link_types = array();
63 $this->ltypes = array(
64 "StructureObject" => $lng->txt(
"cont_lk_chapter"),
65 "StructureObject_New" => $lng->txt(
"cont_lk_chapter_new"),
66 "PageObject" => $lng->txt(
"cont_lk_page"),
67 "PageObject_FAQ" => $lng->txt(
"cont_lk_page_faq"),
68 "PageObject_New" => $lng->txt(
"cont_lk_page_new"),
69 "GlossaryItem" => $lng->txt(
"cont_lk_term"),
70 "GlossaryItem_New" => $lng->txt(
"cont_lk_term_new"),
71 "Media" => $lng->txt(
"cont_lk_media_inline"),
72 "Media_Media" => $lng->txt(
"cont_lk_media_media"),
73 "Media_FAQ" => $lng->txt(
"cont_lk_media_faq"),
74 "Media_New" => $lng->txt(
"cont_lk_media_new"),
75 "WikiPage" => $lng->txt(
"cont_wiki_page"),
76 "File" => $lng->txt(
"cont_lk_file"),
77 "RepositoryItem" => $lng->txt(
"cont_repository_item")
87 $ltype = (
$_SESSION[
"il_link_type"] ==
"")
90 $ltype_arr = explode(
"_", $ltype);
92 if (!isset($this->ltypes[$ltype_arr[0]]) &&
93 !isset($this->ltypes[$ltype]))
99 $this->link_type = ($ltype_arr[0] ==
"")
100 ? $this->default_type
102 $this->link_target = $ltype_arr[1];
111 $this->mode = $a_mode;
116 $this->set_link_script = $a_script;
121 $this->
return = $a_return;
131 $this->filter_link_types[] = $a_link_type;
141 $this->filter_white_list = $a_white_list;
147 $next_class = $this->ctrl->getNextClass($this);
149 $cmd = $this->ctrl->getCmd(
"showLinkHelp");
176 if ($this->
return ==
"")
178 $this->ctrl->returnToParent($this);
193 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
194 if (self::_doJSEditing())
196 $str = htmlspecialchars($str, ENT_QUOTES);
210 if (!$this->filter_white_list)
212 foreach($this->filter_link_types as
$link_type)
214 unset($this->ltypes[$link_type]);
220 foreach($this->ltypes as $k => $l)
222 if (in_array($k, $this->filter_link_types))
234 $ltype = ($this->link_target !=
"")
235 ? $this->link_type.
"_".$this->link_target
241 switch($this->link_type)
244 case "StructureObject":
245 if (empty(
$_SESSION[
"il_link_cont_obj"]) &&
246 ($def_type !=
"mep" && $def_type !=
"glo"))
253 if (empty(
$_SESSION[
"il_link_glossary"]) && $def_type ==
"glo")
260 if (empty(
$_SESSION[
"il_link_mep"]) && $def_type ==
"mep")
267 if (empty(
$_SESSION[
"il_link_wiki"]) && $def_type ==
"wiki")
281 $target_str = ($this->link_target ==
"")
283 :
" target=\"".$this->link_target.
"\"";
285 if(($this->link_type ==
"GlossaryItem") &&
292 if(($this->link_type ==
"WikiPage") &&
299 if(($this->link_type ==
"PageObject" || $this->link_type ==
"StructureObject") &&
302 array(
"lm",
"dbk"))))
306 if ($ilCtrl->isAsynch())
308 $tpl =
new ilTemplate(
"tpl.link_help_asynch.html",
true,
true,
"Services/Link");
312 $tpl =&
new ilTemplate(
"tpl.link_help.html",
true,
true,
"Services/Link");
316 switch($this->link_type)
319 $this->ctrl->setParameter($this,
"target_type",
"glo");
323 case "StructureObject":
324 $this->ctrl->setParameter($this,
"target_type",
"cont_obj");
328 $this->ctrl->setParameter($this,
"target_type",
"mep");
332 $this->ctrl->setParameter($this,
"target_type",
"wiki");
342 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"changeLinkType",
"",
true));
343 $tpl->setVariable(
"FORMACTION2", $this->ctrl->getFormAction($this));
344 $tpl->setVariable(
"TXT_HELP_HEADER", $this->lng->txt(
"cont_link_select"));
345 $tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"cont_link_type"));
351 "ltype", $this->ltypes,
false,
true,
"0",
"", array(
"id" =>
"ilIntLinkTypeSelector"));
352 $tpl->setVariable(
"SELECT_TYPE", $select_ltype);
353 $tpl->setVariable(
"CMD_CHANGETYPE",
"changeLinkType");
354 $tpl->setVariable(
"BTN_CHANGETYPE", $this->lng->txt(
"cont_change_type"));
362 $tpl->setVariable(
"CMD_CLOSE",
"closeLinkHelp");
363 $tpl->setVariable(
"BTN_CLOSE", $this->lng->txt(
"close"));
366 $chapterRowBlock =
"chapter_row";
367 $anchor_row_block =
"anchor_link";
370 $chapterRowBlock .=
"_js";
371 $anchor_row_block .=
"_js";
378 switch($this->link_type)
382 require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
383 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
388 $ctree = $cont_obj->getLMTree();
389 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
390 $tpl->setCurrentBlock(
"chapter_list");
391 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"obj_lm"));
392 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
393 $tpl->setVariable(
"THEAD", $this->lng->txt(
"pages"));
396 $tpl->setCurrentBlock(
"change_cont_obj");
397 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
398 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
399 $tpl->parseCurrentBlock();
401 foreach($nodes as $node)
403 if($node[
"type"] ==
"st")
405 $tpl->setCurrentBlock(
"chapter_row");
406 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
407 $tpl->setVariable(
"ROWCLASS",
"tblrow1");
410 $tpl->parseCurrentBlock();
411 $tpl->setCurrentBlock(
"row");
412 $tpl->parseCurrentBlock();
415 if($node[
"type"] ==
"pg")
417 include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
419 "PageObject",
"pg",
"page",
426 $free_pages = array();
427 foreach ($pages as $page)
429 if (!$ctree->isInTree($page[
"obj_id"]))
431 $free_pages[] = $page;
434 if(count($free_pages) > 0)
436 $tpl->setCurrentBlock(str_replace(
"_js",
"",$chapterRowBlock));
437 $tpl->setVariable(
"TXT_CHAPTER", $this->lng->txt(
"cont_free_pages"));
438 $tpl->setVariable(
"ROWCLASS",
"tblrow1");
439 $tpl->parseCurrentBlock();
441 foreach ($free_pages as $node)
443 include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
445 "PageObject",
"pg",
"page",
450 $tpl->setCurrentBlock(
"chapter_list");
451 $tpl->parseCurrentBlock();
456 case "StructureObject":
467 require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
470 else if ($type ==
"dbk")
472 require_once(
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
477 $ctree =& $cont_obj->getLMTree();
478 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
479 $tpl->setCurrentBlock(
"chapter_list");
480 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"obj_lm"));
481 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
482 $tpl->setVariable(
"THEAD", $this->lng->txt(
"link_chapters"));
483 $tpl->setCurrentBlock(
"change_cont_obj");
484 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
485 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
486 $tpl->parseCurrentBlock();
488 foreach($nodes as $node)
490 if($node[
"type"] ==
"st")
493 "StructureObject",
"st",
"chap");
496 $tpl->setCurrentBlock(
"chapter_list");
497 $tpl->parseCurrentBlock();
502 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
506 $terms = $glossary->getTermList();
507 $tpl->setCurrentBlock(
"chapter_list");
508 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"glossary"));
509 $tpl->setVariable(
"TXT_CONT_TITLE", $glossary->getTitle());
510 $tpl->setVariable(
"THEAD", $this->lng->txt(
"link_terms"));
511 $tpl->setCurrentBlock(
"change_cont_obj");
512 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
513 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
514 $tpl->parseCurrentBlock();
516 foreach($terms as $term)
519 "GlossaryItem",
"git",
"term");
522 $tpl->setCurrentBlock(
"chapter_list");
523 $tpl->parseCurrentBlock();
528 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
533 $tpl->setCurrentBlock(
"change_cont_obj");
534 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
535 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
536 $tpl->parseCurrentBlock();
537 $mobjs = $ilUser->getClipboardObjects(
"mob");
540 foreach ($mobjs as $obj)
542 $objs[$obj[
"title"].
":".$obj[
"id"]] = $obj;
545 $tpl->setCurrentBlock(
"chapter_list");
546 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_media_source"));
547 $tpl->setVariable(
"TXT_CONT_TITLE", $this->lng->txt(
"cont_personal_clipboard"));
548 $tpl->setVariable(
"THEAD", $this->lng->txt(
"link_mobs"));
549 $tpl->setVariable(
"COLSPAN",
"2");
551 foreach($objs as $obj)
554 "MediaObject",
"mob",
"media");
556 $tpl->setCurrentBlock(
"chapter_list");
557 $tpl->parseCurrentBlock();
561 require_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
564 $fobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"],
"fold");
566 foreach ($fobjs as $obj)
568 $f2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
572 $mobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"],
"mob");
574 foreach ($mobjs as $obj)
576 $m2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
581 $objs = array_merge($f2objs, $m2objs);
583 $tpl->setCurrentBlock(
"chapter_list");
584 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"mep"));
585 $tpl->setVariable(
"TXT_CONT_TITLE", $med_pool->getTitle());
586 $tpl->setVariable(
"THEAD", $this->lng->txt(
"link_mobs"));
587 $tpl->setCurrentBlock(
"change_cont_obj");
588 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
589 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
590 $tpl->setVariable(
"COLSPAN",
"2");
591 $tpl->parseCurrentBlock();
592 if ($parent_id = $med_pool->getParentId(
$_SESSION[
"il_link_mep_obj"]))
594 $css_row =
"tblrow1";
595 $tpl->setCurrentBlock(
"icon");
597 $tpl->parseCurrentBlock();
598 $tpl->setCurrentBlock(
"link_row");
599 $tpl->setVariable(
"ROWCLASS", $css_row);
600 $tpl->setVariable(
"TXT_CHAPTER",
"..");
601 $this->ctrl->setParameter($this,
"mep_fold", $parent_id);
602 if ($ilCtrl->isAsynch())
604 $tpl->setVariable(
"LINK",
"#");
605 $tpl->setVariable(
"LR_ONCLICK",
606 " onclick=\"return il.IntLink.setMepPoolFolder('".$parent_id.
"');\" ");
611 $tpl->setVariable(
"LINK",
612 $this->ctrl->getLinkTarget($this,
"setMedPoolFolder"));
614 $tpl->parseCurrentBlock();
615 $tpl->setCurrentBlock(
"row");
616 $tpl->parseCurrentBlock();
618 foreach($objs as $obj)
620 if($obj[
"type"] ==
"fold")
622 $css_row = ($css_row ==
"tblrow2")
625 $tpl->setCurrentBlock(
"icon");
627 $tpl->parseCurrentBlock();
628 $tpl->setCurrentBlock(
"link_row");
629 $tpl->setVariable(
"ROWCLASS", $css_row);
630 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
631 $this->ctrl->setParameter($this,
"mep_fold", $obj[
"child"]);
632 if ($ilCtrl->isAsynch())
634 $tpl->setVariable(
"LINK",
"#");
635 $tpl->setVariable(
"LR_ONCLICK",
636 " onclick=\"return il.IntLink.setMepPoolFolder('".$obj[
"child"].
"');\" ");
641 $tpl->setVariable(
"LINK",
642 $this->ctrl->getLinkTarget($this,
"setMedPoolFolder"));
644 $tpl->parseCurrentBlock();
652 "MediaObject",
"mob",
"media");
655 $tpl->setCurrentBlock(
"row");
656 $tpl->parseCurrentBlock();
658 $tpl->setCurrentBlock(
"chapter_list");
659 $tpl->parseCurrentBlock();
666 require_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
670 $tpl->setCurrentBlock(
"chapter_list");
671 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"obj_wiki"));
673 $tpl->setVariable(
"THEAD", $this->lng->txt(
"link_wpages"));
674 $tpl->setCurrentBlock(
"change_cont_obj");
675 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
676 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
677 $tpl->parseCurrentBlock();
679 foreach($wpages as $wpage)
682 "WikiPage",
"wpage",
"wpage");
685 $tpl->setCurrentBlock(
"chapter_list");
686 $tpl->parseCurrentBlock();
690 case "RepositoryItem":
696 if (!is_object($this->uploaded_file))
709 if ($ilCtrl->isAsynch())
726 if (!is_object($this->uploaded_file))
728 $tpl =
new ilTemplate(
"tpl.link_file.html",
true,
true,
"Services/Link");
729 $tpl->setCurrentBlock(
"form");
730 $tpl->setVariable(
"FORM_ACTION",
731 $ilCtrl->getFormAction($this,
"saveFileLink",
"",
true));
732 $tpl->setVariable(
"TXT_SELECT_FILE", $lng->txt(
"cont_select_file"));
733 $tpl->setVariable(
"TXT_SAVE_LINK", $lng->txt(
"cont_create_link"));
734 $tpl->setVariable(
"CMD_SAVE_LINK",
"saveFileLink");
735 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
738 $tpl->setVariable(
"INPUT", $fi->getToolbarHTML());
739 $tpl->parseCurrentBlock();
744 $tpl =
new ilTemplate(
"tpl.link_file.html",
true,
true,
"Services/Link");
745 $tpl->setCurrentBlock(
"link_js");
749 $tpl->setVariable(
"TAG_B",
750 '[iln dfile=\x22'.$this->uploaded_file->getId().
'\x22]');
751 $tpl->setVariable(
"TAG_E",
753 $tpl->setVariable(
"TXT_FILE",
754 $this->uploaded_file->getTitle());
765 $mtpl =&
new ilTemplate(
"tpl.link_help.html",
true,
true,
"Services/Link");
768 if ($_FILES[
"link_file"][
"name"] !=
"")
770 include_once(
"./Modules/File/classes/class.ilObjFile.php");
772 $fileObj->setType(
"file");
773 $fileObj->setTitle($_FILES[
"link_file"][
"name"]);
774 $fileObj->setDescription(
"");
775 $fileObj->setFileName($_FILES[
"link_file"][
"name"]);
776 $fileObj->setFileType($_FILES[
"link_file"][
"type"]);
777 $fileObj->setFileSize($_FILES[
"link_file"][
"size"]);
778 $fileObj->setMode(
"filelist");
781 $fileObj->createDirectory();
782 $fileObj->raiseUploadError(
false);
783 $fileObj->getUploadFile($_FILES[
"link_file"][
"tmp_name"],
784 $_FILES[
"link_file"][
"name"]);
785 $this->uploaded_file = $fileObj;
798 $med =& $mob->getMediaItem(
"Standard");
799 $target = $med->getThumbnailTarget(
"small");
803 $tpl->setCurrentBlock(
"thumbnail_link");
808 $tpl->setCurrentBlock(
"thumbnail_js");
813 $tpl->setCurrentBlock(
"thumbnail");
818 $tpl->setCurrentBlock(
"thumb".$suff);
819 $tpl->setVariable(
"SRC_THUMB", $target);
820 $tpl->parseCurrentBlock();
824 $tpl->setVariable(
"NO_THUMB",
" ");
829 $tpl->setCurrentBlock(
"thumbnail_link");
834 $tpl->setCurrentBlock(
"thumbnail_js");
838 $tpl->setCurrentBlock(
"thumbnail");
840 $tpl->parseCurrentBlock();
870 $ilCtrl->setParameter($this,
"target_type", $a_type);
871 include_once(
"./Services/Link/classes/class.ilLinkTargetObjectExplorerGUI.php");
877 $a_type =
$_GET[
"target_type"];
881 $script =
"<script>".$exp->getOnLoadCode().
"</script>";
884 $white = array(
"root",
"cat",
"crs",
"fold",
"grp");
890 $exp->setClickableType(
"glo");
895 $exp->setClickableType(
"wiki");
900 $exp->setClickableType(
"mep");
905 $exp->setClickableType(
"lm");
909 $exp->setTypeWhiteList($white);
912 if (!$exp->handleCommand())
914 return $exp->getHTML().$script;
926 if(
$_GET[
"do"] ==
"set")
928 switch (
$_GET[
"target_type"])
952 if (!empty(
$_GET[
"target_type"]))
954 $a_type =
$_GET[
"target_type"];
960 if ($this->link_type ==
"GlossaryItem")
964 if ($this->link_type ==
"Media")
968 if ($this->link_type ==
"WikiPage")
975 $tpl =&
new ilTemplate(
"tpl.link_help_explorer.html",
true,
true,
"Services/Link");
979 if ($a_type ==
"glo")
981 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_glossary"));
983 else if ($a_type ==
"wiki")
985 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_wiki"));
987 else if ($a_type ==
"mep")
989 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_media_source"));
993 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_cont_obj"));
995 $tpl->setVariable(
"EXPLORER",$output);
996 $tpl->setVariable(
"ACTION", $this->ctrl->getFormAction($this,
"resetLinkList",
"",
true));
997 $tpl->setVariable(
"BTN_RESET",
"resetLinkList");
998 $tpl->setVariable(
"TXT_RESET", $this->lng->txt(
"back"));
1000 if ($a_type ==
"mep")
1002 $tpl->setCurrentBlock(
"sel_clipboard");
1003 $this->ctrl->setParameter($this,
"do",
"set");
1004 if ($ilCtrl->isAsynch())
1006 $tpl->setVariable(
"LINK_CLIPBOARD",
"#");
1007 $tpl->setVariable(
"CLIPBOARD_ONCLICK",
1008 " onclick=\"return il.IntLink.selectLinkTargetObject('mep', 0);\" ");
1013 $tpl->setVariable(
"LINK_CLIPBOARD", $this->ctrl->getLinkTarget($this,
"changeTargetObject"));
1015 $tpl->setVariable(
"TXT_PERS_CLIPBOARD", $this->lng->txt(
"clipboard"));
1016 $tpl->parseCurrentBlock();
1019 $tpl->parseCurrentBlock();
1035 $ilCtrl->setParameter($this,
"target_type", $a_type);
1036 include_once(
"./Services/Link/classes/class.ilIntLinkRepItemExplorerGUI.php");
1039 $script =
"<script>".$exp->getOnLoadCode().
"</script>";
1041 if (!$exp->handleCommand())
1043 return $exp->getHTML().$script;
1077 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
1079 if (self::_doJSEditing())
1095 $lng->loadLanguageModule(
"link");
1097 $tpl->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
1098 include_once(
"./Services/UIComponent/Explorer2/classes/class.ilExplorerBaseGUI.php");
1101 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1104 $tpl->addJavascript(
"./Services/Link/js/ilIntLink.js");
1106 include_once(
"./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
1108 $modal->setHeading($lng->txt(
"link_link"));
1109 $modal->setId(
"ilIntLinkModal");
1110 $modal->setBody(
"<div id='ilIntLinkModalContent'></div>");
1112 $ltpl =
new ilTemplate(
"tpl.int_link_panel.html",
true,
true,
"Services/Link");
1113 $ltpl->setVariable(
"MODAL", $modal->getHTML());
1115 $ltpl->setVariable(
"IL_INT_LINK_URL", $a_url);
1117 return $ltpl->get();
1124 $a_anchors = array())
1126 $chapterRowBlock =
"chapter_row";
1127 $anchor_row_block =
"anchor_link";
1131 $chapterRowBlock .=
"_js";
1132 $anchor_row_block .=
"_js";
1135 $target_str = ($this->link_target ==
"")
1137 :
" target=\"".$this->link_target.
"\"";
1139 if (count($a_anchors) > 0)
1141 foreach ($a_anchors as $anchor)
1143 $tpl->setCurrentBlock($anchor_row_block);
1144 $tpl->setVariable(
"ALINK_BEGIN",
1146 $tpl->setVariable(
"ALINK_END",
"[/iln]");
1147 $tpl->setVariable(
"TXT_LINK",
"#".$anchor);
1148 $tpl->parseCurrentBlock();
1152 $this->css_row = ($this->css_row ==
"tblrow1")
1158 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1159 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
1161 if ($a_type ==
"MediaObject")
1165 $tpl->setCurrentBlock(
"link_row");
1166 $tpl->setVariable(
"ROWCLASS", $this->css_row);
1167 $tpl->setVariable(
"TXT_CHAPTER", $a_title);
1169 $tpl->setVariable(
"LINK",
1171 "linktype=".$a_type.
1172 "&linktarget=il__".$a_type_short.
"_".$a_obj_id.
1173 "&linktargetframe=".$this->link_target));
1174 $tpl->parseCurrentBlock();
1178 $tpl->setCurrentBlock($chapterRowBlock);
1179 if ($a_type ==
"MediaObject")
1182 $tpl->setCurrentBlock($chapterRowBlock);
1184 $tpl->setVariable(
"ROWCLASS", $this->css_row);
1185 $tpl->setVariable(
"TXT_CHAPTER", $a_title);
1190 if ($a_type ==
"MediaObject" && empty($target_str))
1192 $tpl->setVariable(
"LINK_BEGIN",
1194 $tpl->setVariable(
"LINK_END",
"");
1198 $tpl->setVariable(
"LINK_BEGIN",
1200 $tpl->setVariable(
"LINK_END",
"[/iln]");
1202 $tpl->parseCurrentBlock();
1205 $tpl->setCurrentBlock(
"row");
1206 $tpl->parseCurrentBlock();