5 require_once(
"classes/class.ilObjectGUI.php");
6 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
7 require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
8 require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
9 require_once(
"./Modules/Glossary/classes/class.ilTermDefinitionEditorGUI.php");
10 require_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
44 $this->offline =
false;
45 $this->ctrl->saveParameter($this, array(
"ref_id",
"letter"));
48 include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
50 $this->glossary =& $this->glossary_gui->object;
60 $this->offline = $a_offline;
68 return $this->offline;
76 $this->offline_dir = $a_dir;
85 return $this->offline_dir;
96 $lng->loadLanguageModule(
"content");
98 $next_class = $this->ctrl->getNextClass($this);
99 $cmd = $this->ctrl->getCmd(
"listTerms");
102 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]) &&
103 !($ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"]) &&
104 (
$cmd ==
"infoScreen" || strtolower($next_class) ==
"ilinfoscreengui")))
106 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
109 if (
$cmd !=
"listDefinitions")
114 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
115 if(IS_PAYMENT_ENABLED ==
true
118 $this->tpl->getStandardTemplate();
120 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
122 $ret = $this->ctrl->forwardCommand($pp);
133 case "ilinfoscreengui":
147 $this->tpl->getStandardTemplate();
148 $title = $this->glossary->getTitle();
150 $this->tpl->setTitle(
$title);
162 global $ilNavigationHistory, $ilAccess,
$ilias,
$lng, $ilToolbar,
$ilCtrl, $ilTabs;
165 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
167 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
172 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
173 $this->ctrl->getLinkTarget($this,
"listTerms"),
"glo");
176 include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
178 $ai->
setLetters($this->glossary->getFirstLetters());
179 $ai->setParentCommand($this,
"chooseLetter");
180 $ai->setHighlighted(
$_GET[
"letter"]);
181 $ilToolbar->addInputItem($ai,
true);
188 $ilCtrl->setParameter($this,
"term_id",
"");
190 $ilTabs->activateTab(
"terms");
201 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
203 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
206 $this->lng->loadLanguageModule(
"meta");
207 include_once
"./Services/Table/classes/class.ilTableGUI.php";
214 $oldoffset = (is_numeric (
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
218 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
224 $tpl->setContent($table->getHTML());
228 $this->tpl->setVariable(
"ADM_CONTENT", $table->getHTML());
229 return $this->tpl->get();
236 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.glossary_presentation.html",
"Modules/Glossary");
241 $this->tpl->setCurrentBlock(
"search_form");
242 $this->ctrl->setParameter($this,
"offset", 0);
243 $this->ctrl->setParameter($this,
"oldoffset", $oldoffset);
244 $this->tpl->setVariable(
"FORMACTION1",
245 $this->ctrl->getFormAction($this,
"searchTerms"));
246 $this->tpl->setVariable(
"TXT_TERM", $this->lng->txt(
"cont_term"));
247 $this->tpl->setVariable(
"TXT_SEARCH", $this->lng->txt(
"search"));
248 $this->tpl->setVariable(
"TXT_CLEAR", $this->lng->txt(
"clear"));
249 $this->tpl->setVariable(
"TERM", $filter);
250 $this->tpl->parseCurrentBlock();
255 $this->tpl->addBlockfile(
"TERM_TABLE",
"term_table",
"tpl.table.html");
257 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.term_tbl_pres_row.html",
"Modules/Glossary");
265 $tbl->setTitle($this->lng->txt(
"cont_terms").(($filter==
"")?
"":
"*"));
266 $tbl->disable(
"sort");
270 if ($this->glossary->isVirtual())
272 $tbl->setHeaderNames(array($this->lng->txt(
"cont_term"),
273 $this->lng->txt(
"cont_definitions"),$this->lng->txt(
"obj_glo")));
275 $cols = array(
"term",
"definitions",
"glossary");
277 $tbl->setColumnWidth(array(
"30%",
"35%",
"35%"));
281 $tbl->setHeaderNames(array($this->lng->txt(
"cont_term"),
282 $this->lng->txt(
"cont_definitions")));
284 $cols = array(
"term",
"definitions");
286 $tbl->setColumnWidth(array(
"30%",
"70%"));
291 $header_params = $this->ctrl->getParameterArrayByClass(
"ilglossarypresentationgui",
"listTerms");
295 if (!empty ($filter)) {
296 $header_params [
"cmd"] =
"searchTerms";
297 $header_params [
"term"] = $filter;
298 $header_params [
"oldoffset"] =
$_GET[
"oldoffset"];
301 $tbl->setHeaderVars($cols, $header_params);
304 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
305 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
308 $_GET[
"limit"] = 99999;
310 $tbl->disable(
"sort");
311 $tbl->disable(
"footer");
313 $tbl->setOffset(
$_GET[
"offset"]);
314 $tbl->setLimit(
$_GET[
"limit"]);
317 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
320 $tbl->setMaxCount(count($term_list));
325 $term_list = array_slice($term_list,
$_GET[
"offset"],
$_GET[
"limit"]);
328 $tbl->setBase(
"ilias.php");
331 if (count($term_list) > 0)
334 foreach($term_list as $key => $term)
339 for($j=0; $j<count($defs); $j++)
342 if (count($defs) > 1)
344 $this->tpl->setCurrentBlock(
"definition");
345 $this->tpl->setVariable(
"DEF_TEXT", $this->lng->txt(
"cont_definition").
" ".($j + 1));
346 $this->tpl->parseCurrentBlock();
350 $this->tpl->setCurrentBlock(
"definition");
351 $short_str = $def[
"short_text"];
354 $ltexs = strrpos($short_str,
"[tex]");
355 $ltexe = strrpos($short_str,
"[/tex]");
360 $short_str = $page->getFirstParagraphText();
361 $short_str = strip_tags($short_str,
"<br>");
362 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
376 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
377 $this->tpl->parseCurrentBlock();
379 $this->tpl->setCurrentBlock(
"definition_row");
380 $this->tpl->parseCurrentBlock();
384 if ($this->glossary->isVirtual())
386 $this->tpl->setCurrentBlock(
"glossary_row");
388 $this->tpl->setVariable(
"GLO_TITLE", $glo_title);
389 $this->tpl->parseCurrentBlock();
392 $this->tpl->setCurrentBlock(
"view_term");
393 $this->tpl->setVariable(
"TEXT_TERM", $term[
"term"]);
396 if (!empty ($filter))
398 $this->ctrl->setParameter($this,
"term", $filter);
399 $this->ctrl->setParameter($this,
"oldoffset",
$_GET[
"oldoffset"]);
401 $this->ctrl->setParameter($this,
"term_id", $term[
"id"]);
402 $this->ctrl->setParameter($this,
"offset",
$_GET[
"offset"]);
403 $this->tpl->setVariable(
"LINK_VIEW_TERM",
404 $this->ctrl->getLinkTarget($this,
"listDefinitions"));
405 $this->ctrl->clearParameters($this);
409 $this->tpl->setVariable(
"LINK_VIEW_TERM",
"term_".$term[
"id"].
".html");
411 $this->tpl->setVariable(
"ANCHOR_TERM",
"term_".$term[
"id"]);
412 $this->tpl->parseCurrentBlock();
414 $this->tpl->setVariable(
"CSS_ROW", $css_row);
415 $this->tpl->setVariable(
"TEXT_LANGUAGE", $this->lng->txt(
"meta_l_".$term[
"language"]));
416 $this->tpl->setCurrentBlock(
"tbl_content");
417 $this->tpl->parseCurrentBlock();
419 $this->ctrl->clearParameters($this);
424 $this->tpl->setCurrentBlock(
"notfound");
425 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
426 $this->tpl->setVariable(
"NUM_COLS", $num);
427 $this->tpl->parseCurrentBlock();
431 if (!$this->
offlineMode() && $ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
433 $this->tpl->setCurrentBlock(
"edit_glossary");
434 $this->tpl->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit"));
435 $this->tpl->setVariable(
"EDIT_LINK",
436 "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".
$_GET[
"ref_id"]);
437 $this->tpl->setVariable(
"EDIT_TARGET",
"_top");
438 $this->tpl->parseCurrentBlock();
442 $this->tpl->setCurrentBlock(
"perma_link");
443 $this->tpl->setVariable(
"PERMA_LINK", ILIAS_HTTP_PATH.
444 "/goto.php?target=glo_".$_GET[
"ref_id"].
"&client_id=".CLIENT_ID);
445 $this->tpl->setVariable(
"TXT_PERMA_LINK", $this->lng->txt(
"perma_link"));
446 $this->tpl->setVariable(
"PERMA_TARGET",
"_top");
447 $this->tpl->parseCurrentBlock();
451 return $this->tpl->get();
462 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
465 $prtab->resetOffset();
466 $prtab->writeFilterToSession();
477 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
480 $prtab->resetOffset();
481 $prtab->resetFilter();
502 $term_id = (int)
$_GET[
"term_id"];
506 $term_id = $a_term_id;
509 if (!$ilAccess->checkAccess(
"read",
"",
$ref_id))
511 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
520 require_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
521 $tpl->getStandardTemplate();
526 $style_name = $ilUser->prefs[
"style"].
".css";;
527 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./".$style_name);
535 $tpl->setCurrentBlock(
"ContentStyle");
538 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
543 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
545 $tpl->parseCurrentBlock();
548 $tpl->setCurrentBlock(
"SyntaxStyle");
551 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
556 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
557 "syntaxhighlight.css");
559 $tpl->parseCurrentBlock();
562 $tpl->setTitle($this->lng->txt(
"cont_term").
": ".$term->getTerm());
565 $tpl->addBlockfile(
"ADM_CONTENT",
"def_list",
"tpl.glossary_definition_list.html",
"Modules/Glossary");
570 $this->tpl->setCurrentBlock(
"ContentStyle");
573 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
578 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
580 $this->tpl->parseCurrentBlock();
583 $this->tpl->setCurrentBlock(
"SyntaxStyle");
586 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
591 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
592 "syntaxhighlight.css");
594 $this->tpl->parseCurrentBlock();
596 $tpl =
new ilTemplate(
"tpl.glossary_definition_list.html",
true,
true,
"Modules/Glossary");
601 $tpl->setVariable(
"TXT_TERM", $term->getTerm());
602 $this->mobs = array();
604 for($j=0; $j<count($defs); $j++)
608 $page = $page_gui->getPageObject();
612 $int_links = $page->getInternalLinks();
614 $page_gui->setLinkXML($link_xml);
618 $page_gui->setOutputMode(
"offline");
622 $page_gui->setFullscreenLink($this->
getLink(
$ref_id,
"fullscreen", $term_id, $def[
"id"]));
624 $page_gui->setTemplateOutput(
false);
625 $page_gui->setRawPageContent(
true);
626 $page_gui->setFileDownloadLink($this->
getLink(
$ref_id,
"downloadFile"));
629 $output = $page_gui->preview();
633 $output = $page_gui->presentation($page_gui->getOutputMode());
636 if (count($defs) > 1)
638 $tpl->setCurrentBlock(
"definition_header");
639 $tpl->setVariable(
"TXT_DEFINITION",
640 $this->lng->txt(
"cont_definition").
" ".($j+1));
641 $tpl->parseCurrentBlock();
644 $tpl->setCurrentBlock(
"definition");
645 $tpl->setVariable(
"PAGE_CONTENT", $output);
646 $tpl->parseCurrentBlock();
654 $backlist_shown =
false;
655 foreach ($sources as $src)
657 $type = explode(
':',$src[
'type']);
659 if ($type[0] ==
'lm')
661 if ($type[1] ==
'pg')
666 $tpl->setCurrentBlock(
'backlink_item');
669 foreach($ref_ids as $rid)
671 if ($ilAccess->checkAccess(
"read",
"", $rid))
678 $tpl->setCurrentBlock(
"backlink_item");
679 $tpl->setVariable(
"BACKLINK_LINK",ILIAS_HTTP_PATH.
"/goto.php?target=".$type[1].
"_".$src[
'id']);
680 $tpl->setVariable(
"BACKLINK_ITEM",$lm_title.
": ".
$title);
681 $tpl->parseCurrentBlock();
682 $backlist_shown =
true;
689 $tpl->setCurrentBlock(
"backlink_list");
690 $tpl->setVariable(
"BACKLINK_TITLE",$this->lng->txt(
'glo_term_used_in'));
691 $tpl->parseCurrentBlock();
697 $tpl->setCurrentBlock(
"perma_link");
698 $tpl->setVariable(
"PERMA_LINK", ILIAS_HTTP_PATH.
701 "_".$term_id.
"_".
$ref_id.
"&client_id=".CLIENT_ID);
702 $tpl->setVariable(
"TXT_PERMA_LINK", $this->lng->txt(
"perma_link"));
703 $tpl->setVariable(
"PERMA_TARGET",
"_top");
704 $tpl->parseCurrentBlock();
710 include_once
'./Services/Search/classes/class.ilUserSearchCache.php';
713 $search_string = $cache->getQuery();
715 include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
716 include_once(
"./Services/Search/classes/class.ilQueryParser.php");
720 $words = $p->getQuotedWords();
721 if (is_array($words))
723 foreach ($words as $w)
728 $this->fill_on_load_code =
true;
743 $html = $this->
media(
"fullscreen");
752 $this->tpl =&
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
753 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
755 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
766 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
777 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
778 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
788 $enlarge_path =
"images/enlarge.gif";
794 $this->ctrl->setParameter($this,
"obj_type",
"MediaObject");
797 $this->ctrl->clearParameters($this);
799 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
800 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' => $fullscreen_link,
801 'ref_id' =>
$_GET[
"ref_id"],
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
802 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
807 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
809 $this->tpl->parseCurrentBlock();
812 $html = $this->tpl->get();
825 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
827 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
830 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.glo_download_list.html",
"Modules/Glossary");
833 $ilTabs->activateTab(
"download");
836 $this->tpl->setTitle($this->glossary->getTitle());
841 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
845 $this->tpl->addBlockfile(
"DOWNLOAD_TABLE",
"download_table",
"tpl.table.html");
848 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/Glossary");
850 $export_files = array();
851 $types = array(
"xml",
"html");
852 foreach($types as $type)
854 if ($this->glossary->getPublicExportFile($type) !=
"")
856 $dir = $this->glossary->getExportDirectory($type);
857 if (is_file($this->glossary->getExportDirectory($type).
"/".
858 $this->glossary->getPublicExportFile($type)))
860 $size = filesize($this->glossary->getExportDirectory($type).
"/".
861 $this->glossary->getPublicExportFile($type));
862 $export_files[] = array(
"type" => $type,
863 "file" => $this->glossary->getPublicExportFile($type),
871 $tbl->setTitle($this->lng->txt(
"download"));
873 $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
874 $this->lng->txt(
"cont_file"),
875 $this->lng->txt(
"size"), $this->lng->txt(
"date"),
878 $cols = array(
"format",
"file",
"size",
"date",
"download");
879 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
880 "cmd" =>
"showDownloadList",
"cmdClass" => strtolower(get_class($this)));
881 $tbl->setHeaderVars($cols, $header_params);
882 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
883 $tbl->disable(
"sort");
886 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
887 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
888 $tbl->setLimit(
$_GET[
"limit"]);
889 $tbl->setOffset(
$_GET[
"offset"]);
890 $tbl->setMaxCount($this->maxcount);
892 $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
896 $tbl->disable(
"footer");
898 $tbl->setMaxCount(count($export_files));
899 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
902 if(count($export_files) > 0)
905 foreach($export_files as $exp_file)
907 $this->tpl->setCurrentBlock(
"tbl_content");
908 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
911 $this->tpl->setVariable(
"CSS_ROW", $css_row);
913 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
914 $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
915 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
917 $file_arr = explode(
"__", $exp_file[
"file"]);
918 $this->tpl->setVariable(
"TXT_DATE", date(
"Y-m-d H:i:s",$file_arr[0]));
920 $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
921 $this->ctrl->setParameter($this,
"type", $exp_file[
"type"]);
922 $this->tpl->setVariable(
"LINK_DOWNLOAD",
923 $this->ctrl->getLinkTarget($this,
"downloadExportFile"));
925 $this->tpl->parseCurrentBlock();
930 $this->tpl->setCurrentBlock(
"notfound");
931 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
932 $this->tpl->setVariable(
"NUM_COLS", 5);
933 $this->tpl->parseCurrentBlock();
946 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
948 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
951 $file = $this->glossary->getPublicExportFile(
$_GET[
"type"]);
952 if ($this->glossary->getPublicExportFile(
$_GET[
"type"]) !=
"")
954 $dir = $this->glossary->getExportDirectory(
$_GET[
"type"]);
961 $this->ilias->raiseError($this->lng->txt(
"file_not_found"),$this->ilias->error_obj->MESSAGE);
973 global $ilias_locator;
976 require_once (
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
978 $gloss_loc->setMode(
"presentation");
979 if (!empty(
$_GET[
"term_id"]))
982 $gloss_loc->setTerm($term);
984 $gloss_loc->setGlossary($this->glossary);
986 $gloss_loc->display();
996 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
998 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
1002 include_once(
"./Modules/File/classes/class.ilObjFile.php");
1004 $fileObj->sendFile();
1015 #include_once("classes/class.ilTabsGUI.php");
1016 #$tabs_gui =& new ilTabsGUI();
1019 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
1029 if ($a_layoutframes ==
"")
1031 $a_layoutframes = array();
1033 $link_info =
"<IntLinkInfos>";
1034 foreach ($a_int_links as $int_link)
1037 $target = $int_link[
"Target"];
1038 if (substr($target, 0, 4) ==
"il__")
1042 $type = $int_link[
"Type"];
1043 $targetframe = ($int_link[
"TargetFrame"] !=
"")
1044 ? $int_link[
"TargetFrame"]
1048 $anc = $anc_add =
"";
1049 if ($int_link[
"Anchor"] !=
"")
1051 $anc = $int_link[
"Anchor"];
1052 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1055 if ($targetframe ==
"New")
1057 $ltarget =
"_blank";
1067 case "StructureObject":
1069 $cont_obj =& $this->content_object;
1070 if ($type ==
"PageObject")
1072 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1076 $href =
"./goto.php?target=st_".$target_id;
1081 case "GlossaryItem":
1086 $href =
"term_".$target_id.
".html";
1090 $this->ctrl->setParameter($this,
"term_id",
$target_id);
1091 $href = $this->ctrl->getLinkTarget($this,
"listDefinitions");
1092 $href = str_replace(
"&",
"&", $href);
1097 $href =
"./goto.php?target=git_".$target_id;
1104 $href =
"media_".$target_id.
".html";
1108 $this->ctrl->setParameter($this,
"obj_type", $type);
1109 $this->ctrl->setParameter($this,
"mob_id",
$target_id);
1110 $href = $this->ctrl->getLinkTarget($this,
"media");
1111 $href = str_replace(
"&",
"&", $href);
1115 case "RepositoryItem":
1118 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1120 $ltarget = $t_frame;
1125 $anc_par =
'Anchor="'.$anc.
'"';
1127 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
1128 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
1130 $this->ctrl->clearParameters($this);
1133 $link_info.=
"</IntLinkInfos>";
1142 function getLink($a_ref_id, $a_cmd =
"", $a_term_id =
"", $a_def_id =
"",
1143 $a_frame =
"", $a_type =
"")
1158 $this->ctrl->setParameter($this,
"def_id", $a_def_id);
1159 $link = $this->ctrl->getLinkTarget($this,
"fullscreen");
1163 $link.=
"&cmd=".$a_cmd;
1166 $this->ctrl->setParameter($this,
"frame", $a_frame);
1168 if ($a_obj_id !=
"")
1173 $this->ctrl->setParameter($this,
"mob_id", $a_obj_id);
1177 $this->ctrl->setParameter($this,
"def_id", $a_def_id);
1183 $this->ctrl->setParameter($this,
"obj_type", $a_type);
1185 $link = $this->ctrl->getLinkTarget($this, $a_cmd);
1194 case "downloadFile":
1198 $link =
"fullscreen.html";
1205 $link =
"term_".$a_obj_id.
".html";
1209 $link =
"media_".$a_obj_id.
".html";
1216 $this->ctrl->clearParameters($this);
1231 $ilTabs->activateTab(
"print_view");
1233 $ilToolbar->setFormAction($ilCtrl->getFormAction($this,
"printView"),
1234 false,
"print_view");
1235 $ilToolbar->addFormButton($lng->txt(
"cont_show_print_view"),
"printView");
1236 $ilToolbar->setCloseFormTag(
false);
1240 $tpl->setContent($this->form->getHTML());
1250 $terms = $this->glossary->getTermList();
1252 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1260 .
" (".$lng->txt(
"cont_terms").
": ".count($terms).
")",
"glossary");
1261 $radg->addOption($op2);
1262 $op3=
new ilRadioOption($lng->txt(
"cont_selected_terms"),
"selection");
1263 $radg->addOption($op3);
1265 include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
1267 $op3->addSubItem($nl);
1269 foreach ($terms as
$t)
1271 $nl->addListNode($t[
"id"], $t[
"term"], 0,
false,
false);
1274 $this->form->addItem($radg);
1276 $this->form->addCommandButton(
"printView", $lng->txt(
"cont_show_print_view"));
1277 $this->form->setCloseTag(
false);
1279 $this->form->setTitle($lng->txt(
"cont_print_selection"));
1292 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1298 switch (
$_POST[
"sel_type"])
1301 $ts = $this->glossary->getTermList();
1304 $terms[] = $t[
"id"];
1309 if (is_array(
$_POST[
"obj_id"]))
1311 $terms =
$_POST[
"obj_id"];
1324 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1325 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1327 $this->tpl->parseCurrentBlock();
1330 $this->tpl->setCurrentBlock(
"ContentStyle");
1331 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1333 $this->tpl->parseCurrentBlock();
1337 foreach ($terms as $t_id)
1341 $tpl->setVariable(
"CONTENT",
'<div class="ilInvisibleBorder">'.$page_content.
'</div>'.
1342 '<script type="text/javascript" language="javascript1.2">
1344 // Do print the page
1345 if (typeof(window.print) != \'undefined\')
1362 $oldoffset = (is_numeric (
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
1366 if ($this->ctrl->getCmd() !=
"listDefinitions")
1368 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1370 $tabs_gui->addTab(
"terms",
1371 $lng->txt(
"cont_terms"),
1372 $ilCtrl->getLinkTarget($this,
"listTerms"));
1375 $tabs_gui->addTab(
"info",
1376 $lng->txt(
"info_short"),
1377 $ilCtrl->getLinkTarget($this,
"infoScreen"));
1379 $tabs_gui->addTab(
"print_view",
1380 $lng->txt(
"cont_print_view"),
1381 $ilCtrl->getLinkTarget($this,
"printViewSelection"));
1384 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1389 if ($this->glossary->isActiveDownloads())
1391 $tabs_gui->addTab(
"download",
1392 $lng->txt(
"download"),
1393 $ilCtrl->getLinkTarget($this,
"showDownloadList"));
1398 if ($ilAccess->checkAccess(
"write",
"", (
int)
$_GET[
"ref_id"]))
1400 $tabs_gui->addNonTabbedLink(
"editing_view",
1401 $lng->txt(
"glo_editing_view"),
1402 "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".(int) $_GET[
"ref_id"],
1409 $this->ctrl->setParameter($this,
"offset",
$_GET[
"offset"]);
1412 $this->ctrl->setParameter($this,
"term",
$_REQUEST[
"term"]);
1413 $this->ctrl->setParameter($this,
"oldoffset",
$_GET[
"oldoffset"]);
1414 $back = $ilCtrl->getLinkTarget($this,
"searchTerms");
1418 $back = $ilCtrl->getLinkTarget($this,
"listTerms");
1420 $tabs_gui->setBackTarget($this->lng->txt(
"obj_glo"), $back);
1426 $tabs_gui->addTarget(
"cont_back",
1427 "index.html#term_".
$_GET[
"term_id"],
"",
1433 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1435 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1446 $this->ctrl->setCmd(
"showSummary");
1447 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1465 global
$ilBench, $ilAccess, $ilTabs;
1468 $ilTabs->activateTab(
"info");
1469 $this->lng->loadLanguageModule(
"meta");
1471 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1474 $info->enablePrivateNotes();
1477 $info->enableNews();
1478 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1480 $info->enableNewsEditing();
1482 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1483 if ($enable_internal_rss)
1485 $info->setBlockProperty(
"news",
"settings",
true);
1490 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1507 $info->addMetaDataSections($this->glossary->getId(),0, $this->glossary->getType());
1509 include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
1514 $this->tpl->setContent($info->getHTML());
1515 return $this->tpl->get();
1520 $this->ctrl->forwardCommand($info);
1534 $ilCtrl->redirect($this,
"listTerms");