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")
121 case "ilinfoscreengui":
135 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
136 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
137 $title = $this->glossary->getTitle();
139 $this->tpl->setTitle(
$title);
151 global $ilNavigationHistory, $ilAccess,
$ilias,
$lng, $ilToolbar,
$ilCtrl, $ilTabs;
154 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
156 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
161 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
162 $this->ctrl->getLinkTarget($this,
"listTerms"),
"glo");
165 include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
167 $ai->
setLetters($this->glossary->getFirstLetters());
168 $ai->setParentCommand($this,
"chooseLetter");
169 $ai->setHighlighted(
$_GET[
"letter"]);
170 $ilToolbar->addInputItem($ai,
true);
177 $ilCtrl->setParameter($this,
"term_id",
"");
179 $ilTabs->activateTab(
"terms");
190 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
192 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
195 $this->lng->loadLanguageModule(
"meta");
196 include_once
"./Services/Table/classes/class.ilTableGUI.php";
203 $oldoffset = (is_numeric (
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
207 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
213 $tpl->setContent($table->getHTML());
217 $this->tpl->setVariable(
"ADM_CONTENT", $table->getHTML());
218 return $this->tpl->get();
225 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.glossary_presentation.html",
"Modules/Glossary");
230 $this->tpl->setCurrentBlock(
"search_form");
231 $this->ctrl->setParameter($this,
"offset", 0);
232 $this->ctrl->setParameter($this,
"oldoffset", $oldoffset);
233 $this->tpl->setVariable(
"FORMACTION1",
234 $this->ctrl->getFormAction($this,
"searchTerms"));
235 $this->tpl->setVariable(
"TXT_TERM", $this->lng->txt(
"cont_term"));
236 $this->tpl->setVariable(
"TXT_SEARCH", $this->lng->txt(
"search"));
237 $this->tpl->setVariable(
"TXT_CLEAR", $this->lng->txt(
"clear"));
238 $this->tpl->setVariable(
"TERM", $filter);
239 $this->tpl->parseCurrentBlock();
244 $this->tpl->addBlockfile(
"TERM_TABLE",
"term_table",
"tpl.table.html");
246 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.term_tbl_pres_row.html",
"Modules/Glossary");
254 $tbl->setTitle($this->lng->txt(
"cont_terms").(($filter==
"")?
"":
"*"));
255 $tbl->disable(
"sort");
259 if ($this->glossary->isVirtual())
261 $tbl->setHeaderNames(array($this->lng->txt(
"cont_term"),
262 $this->lng->txt(
"cont_definitions"),$this->lng->txt(
"obj_glo")));
264 $cols = array(
"term",
"definitions",
"glossary");
266 $tbl->setColumnWidth(array(
"30%",
"35%",
"35%"));
270 $tbl->setHeaderNames(array($this->lng->txt(
"cont_term"),
271 $this->lng->txt(
"cont_definitions")));
273 $cols = array(
"term",
"definitions");
275 $tbl->setColumnWidth(array(
"30%",
"70%"));
280 $header_params = $this->ctrl->getParameterArrayByClass(
"ilglossarypresentationgui",
"listTerms");
284 if (!empty ($filter)) {
285 $header_params [
"cmd"] =
"searchTerms";
286 $header_params [
"term"] = $filter;
287 $header_params [
"oldoffset"] =
$_GET[
"oldoffset"];
290 $tbl->setHeaderVars($cols, $header_params);
293 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
294 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
297 $_GET[
"limit"] = 99999;
299 $tbl->disable(
"sort");
300 $tbl->disable(
"footer");
302 $tbl->setOffset(
$_GET[
"offset"]);
303 $tbl->setLimit(
$_GET[
"limit"]);
306 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
309 $tbl->setMaxCount(count($term_list));
314 $term_list = array_slice($term_list,
$_GET[
"offset"],
$_GET[
"limit"]);
317 $tbl->setBase(
"ilias.php");
320 if (count($term_list) > 0)
323 foreach($term_list as $key => $term)
328 for($j=0; $j<count($defs); $j++)
331 if (count($defs) > 1)
333 $this->tpl->setCurrentBlock(
"definition");
334 $this->tpl->setVariable(
"DEF_TEXT", $this->lng->txt(
"cont_definition").
" ".($j + 1));
335 $this->tpl->parseCurrentBlock();
339 $this->tpl->setCurrentBlock(
"definition");
340 $short_str = $def[
"short_text"];
343 $ltexs = strrpos($short_str,
"[tex]");
344 $ltexe = strrpos($short_str,
"[/tex]");
349 $short_str = $page->getFirstParagraphText();
350 $short_str = strip_tags($short_str,
"<br>");
351 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
365 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
366 $this->tpl->parseCurrentBlock();
368 $this->tpl->setCurrentBlock(
"definition_row");
369 $this->tpl->parseCurrentBlock();
373 if ($this->glossary->isVirtual())
375 $this->tpl->setCurrentBlock(
"glossary_row");
377 $this->tpl->setVariable(
"GLO_TITLE", $glo_title);
378 $this->tpl->parseCurrentBlock();
381 $this->tpl->setCurrentBlock(
"view_term");
382 $this->tpl->setVariable(
"TEXT_TERM", $term[
"term"]);
385 if (!empty ($filter))
387 $this->ctrl->setParameter($this,
"term", $filter);
388 $this->ctrl->setParameter($this,
"oldoffset",
$_GET[
"oldoffset"]);
390 $this->ctrl->setParameter($this,
"term_id", $term[
"id"]);
391 $this->ctrl->setParameter($this,
"offset",
$_GET[
"offset"]);
392 $this->tpl->setVariable(
"LINK_VIEW_TERM",
393 $this->ctrl->getLinkTarget($this,
"listDefinitions"));
394 $this->ctrl->clearParameters($this);
398 $this->tpl->setVariable(
"LINK_VIEW_TERM",
"term_".$term[
"id"].
".html");
400 $this->tpl->setVariable(
"ANCHOR_TERM",
"term_".$term[
"id"]);
401 $this->tpl->parseCurrentBlock();
403 $this->tpl->setVariable(
"CSS_ROW", $css_row);
404 $this->tpl->setVariable(
"TEXT_LANGUAGE", $this->lng->txt(
"meta_l_".$term[
"language"]));
405 $this->tpl->setCurrentBlock(
"tbl_content");
406 $this->tpl->parseCurrentBlock();
408 $this->ctrl->clearParameters($this);
413 $this->tpl->setCurrentBlock(
"notfound");
414 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
415 $this->tpl->setVariable(
"NUM_COLS", $num);
416 $this->tpl->parseCurrentBlock();
420 if (!$this->
offlineMode() && $ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
422 $this->tpl->setCurrentBlock(
"edit_glossary");
423 $this->tpl->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit"));
424 $this->tpl->setVariable(
"EDIT_LINK",
425 "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".
$_GET[
"ref_id"]);
426 $this->tpl->setVariable(
"EDIT_TARGET",
"_top");
427 $this->tpl->parseCurrentBlock();
431 $this->tpl->setCurrentBlock(
"perma_link");
432 $this->tpl->setVariable(
"PERMA_LINK", ILIAS_HTTP_PATH.
433 "/goto.php?target=glo_".$_GET[
"ref_id"].
"&client_id=".CLIENT_ID);
434 $this->tpl->setVariable(
"TXT_PERMA_LINK", $this->lng->txt(
"perma_link"));
435 $this->tpl->setVariable(
"PERMA_TARGET",
"_top");
436 $this->tpl->parseCurrentBlock();
440 return $this->tpl->get();
451 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
454 $prtab->resetOffset();
455 $prtab->writeFilterToSession();
466 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
469 $prtab->resetOffset();
470 $prtab->resetFilter();
491 $term_id = (int)
$_GET[
"term_id"];
495 $term_id = $a_term_id;
498 if (!$ilAccess->checkAccess(
"read",
"",
$ref_id))
500 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
509 require_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
510 $tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
511 $tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
517 $style_name = $ilUser->prefs[
"style"].
".css";;
518 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./".$style_name);
526 $tpl->setCurrentBlock(
"ContentStyle");
529 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
534 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
536 $tpl->parseCurrentBlock();
539 $tpl->setCurrentBlock(
"SyntaxStyle");
542 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
547 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
548 "syntaxhighlight.css");
550 $tpl->parseCurrentBlock();
553 $tpl->setTitle($this->lng->txt(
"cont_term").
": ".$term->getTerm());
556 $tpl->addBlockfile(
"ADM_CONTENT",
"def_list",
"tpl.glossary_definition_list.html",
"Modules/Glossary");
561 $this->tpl->setCurrentBlock(
"ContentStyle");
564 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
569 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
571 $this->tpl->parseCurrentBlock();
574 $this->tpl->setCurrentBlock(
"SyntaxStyle");
577 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
582 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
583 "syntaxhighlight.css");
585 $this->tpl->parseCurrentBlock();
587 $tpl =
new ilTemplate(
"tpl.glossary_definition_list.html",
true,
true,
"Modules/Glossary");
592 $tpl->setVariable(
"TXT_TERM", $term->getTerm());
593 $this->mobs = array();
595 for($j=0; $j<count($defs); $j++)
599 $page = $page_gui->getPageObject();
603 $int_links = $page->getInternalLinks();
605 $page_gui->setLinkXML($link_xml);
609 $page_gui->setOutputMode(
"offline");
613 $page_gui->setFullscreenLink($this->
getLink(
$ref_id,
"fullscreen", $term_id, $def[
"id"]));
615 $page_gui->setTemplateOutput(
false);
616 $page_gui->setRawPageContent(
true);
617 $page_gui->setFileDownloadLink($this->
getLink(
$ref_id,
"downloadFile"));
620 $output = $page_gui->preview();
624 $output = $page_gui->presentation($page_gui->getOutputMode());
627 if (count($defs) > 1)
629 $tpl->setCurrentBlock(
"definition_header");
630 $tpl->setVariable(
"TXT_DEFINITION",
631 $this->lng->txt(
"cont_definition").
" ".($j+1));
632 $tpl->parseCurrentBlock();
635 $tpl->setCurrentBlock(
"definition");
636 $tpl->setVariable(
"PAGE_CONTENT", $output);
637 $tpl->parseCurrentBlock();
645 $backlist_shown =
false;
646 foreach ($sources as $src)
648 $type = explode(
':',$src[
'type']);
650 if (
$type[0] ==
'lm')
652 if (
$type[1] ==
'pg')
657 $tpl->setCurrentBlock(
'backlink_item');
660 foreach($ref_ids as $rid)
662 if ($ilAccess->checkAccess(
"read",
"", $rid))
669 $tpl->setCurrentBlock(
"backlink_item");
670 $tpl->setVariable(
"BACKLINK_LINK",ILIAS_HTTP_PATH.
"/goto.php?target=".
$type[1].
"_".$src[
'id']);
671 $tpl->setVariable(
"BACKLINK_ITEM",$lm_title.
": ".
$title);
672 $tpl->parseCurrentBlock();
673 $backlist_shown =
true;
680 $tpl->setCurrentBlock(
"backlink_list");
681 $tpl->setVariable(
"BACKLINK_TITLE",$this->lng->txt(
'glo_term_used_in'));
682 $tpl->parseCurrentBlock();
688 $tpl->setCurrentBlock(
"perma_link");
689 $tpl->setVariable(
"PERMA_LINK", ILIAS_HTTP_PATH.
692 "_".$term_id.
"_".
$ref_id.
"&client_id=".CLIENT_ID);
693 $tpl->setVariable(
"TXT_PERMA_LINK", $this->lng->txt(
"perma_link"));
694 $tpl->setVariable(
"PERMA_TARGET",
"_top");
695 $tpl->parseCurrentBlock();
701 include_once
'./Services/Search/classes/class.ilUserSearchCache.php';
704 $search_string = $cache->getQuery();
706 include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
707 include_once(
"./Services/Search/classes/class.ilQueryParser.php");
711 $words = $p->getQuotedWords();
712 if (is_array($words))
714 foreach ($words as $w)
719 $this->fill_on_load_code =
true;
734 $html = $this->
media(
"fullscreen");
743 $this->tpl =&
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
744 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
746 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
757 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
768 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
769 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
779 $enlarge_path =
"images/enlarge.gif";
785 $this->ctrl->setParameter($this,
"obj_type",
"MediaObject");
788 $this->ctrl->clearParameters($this);
790 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
791 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' => $fullscreen_link,
792 'ref_id' =>
$_GET[
"ref_id"],
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
793 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
798 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
800 $this->tpl->parseCurrentBlock();
803 $html = $this->tpl->get();
816 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
818 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
821 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.glo_download_list.html",
"Modules/Glossary");
824 $ilTabs->activateTab(
"download");
827 $this->tpl->setTitle($this->glossary->getTitle());
832 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
836 $this->tpl->addBlockfile(
"DOWNLOAD_TABLE",
"download_table",
"tpl.table.html");
839 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/Glossary");
841 $export_files = array();
842 $types = array(
"xml",
"html");
843 foreach($types as
$type)
845 if ($this->glossary->getPublicExportFile($type) !=
"")
847 $dir = $this->glossary->getExportDirectory($type);
848 if (is_file($this->glossary->getExportDirectory($type).
"/".
849 $this->glossary->getPublicExportFile($type)))
851 $size = filesize($this->glossary->getExportDirectory($type).
"/".
852 $this->glossary->getPublicExportFile($type));
853 $export_files[] = array(
"type" => $type,
854 "file" => $this->glossary->getPublicExportFile($type),
862 $tbl->setTitle($this->lng->txt(
"download"));
864 $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
865 $this->lng->txt(
"cont_file"),
866 $this->lng->txt(
"size"), $this->lng->txt(
"date"),
869 $cols = array(
"format",
"file",
"size",
"date",
"download");
870 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
871 "cmd" =>
"showDownloadList",
"cmdClass" => strtolower(get_class($this)));
872 $tbl->setHeaderVars($cols, $header_params);
873 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
874 $tbl->disable(
"sort");
877 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
878 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
879 $tbl->setLimit(
$_GET[
"limit"]);
880 $tbl->setOffset(
$_GET[
"offset"]);
881 $tbl->setMaxCount($this->maxcount);
883 $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
887 $tbl->disable(
"footer");
889 $tbl->setMaxCount(count($export_files));
890 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
893 if(count($export_files) > 0)
896 foreach($export_files as $exp_file)
898 $this->tpl->setCurrentBlock(
"tbl_content");
899 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
902 $this->tpl->setVariable(
"CSS_ROW", $css_row);
904 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
905 $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
906 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
908 $file_arr = explode(
"__", $exp_file[
"file"]);
909 $this->tpl->setVariable(
"TXT_DATE", date(
"Y-m-d H:i:s",$file_arr[0]));
911 $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
912 $this->ctrl->setParameter($this,
"type", $exp_file[
"type"]);
913 $this->tpl->setVariable(
"LINK_DOWNLOAD",
914 $this->ctrl->getLinkTarget($this,
"downloadExportFile"));
916 $this->tpl->parseCurrentBlock();
921 $this->tpl->setCurrentBlock(
"notfound");
922 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
923 $this->tpl->setVariable(
"NUM_COLS", 5);
924 $this->tpl->parseCurrentBlock();
937 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
939 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
942 $file = $this->glossary->getPublicExportFile(
$_GET[
"type"]);
943 if ($this->glossary->getPublicExportFile(
$_GET[
"type"]) !=
"")
945 $dir = $this->glossary->getExportDirectory(
$_GET[
"type"]);
952 $this->ilias->raiseError($this->lng->txt(
"file_not_found"),$this->ilias->error_obj->MESSAGE);
964 global $ilias_locator;
967 require_once (
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
969 $gloss_loc->setMode(
"presentation");
970 if (!empty(
$_GET[
"term_id"]))
973 $gloss_loc->setTerm($term);
975 $gloss_loc->setGlossary($this->glossary);
977 $gloss_loc->display();
987 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
989 $ilias->raiseError($lng->txt(
"permission_denied"),$ilias->error_obj->MESSAGE);
993 include_once(
"./Modules/File/classes/class.ilObjFile.php");
995 $fileObj->sendFile();
1006 #include_once("classes/class.ilTabsGUI.php");
1007 #$tabs_gui =& new ilTabsGUI();
1010 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
1020 if ($a_layoutframes ==
"")
1022 $a_layoutframes = array();
1024 $link_info =
"<IntLinkInfos>";
1025 foreach ($a_int_links as $int_link)
1028 $target = $int_link[
"Target"];
1029 if (substr($target, 0, 4) ==
"il__")
1033 $type = $int_link[
"Type"];
1034 $targetframe = ($int_link[
"TargetFrame"] !=
"")
1035 ? $int_link[
"TargetFrame"]
1039 $anc = $anc_add =
"";
1040 if ($int_link[
"Anchor"] !=
"")
1042 $anc = $int_link[
"Anchor"];
1043 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1046 if ($targetframe ==
"New")
1048 $ltarget =
"_blank";
1058 case "StructureObject":
1060 $cont_obj =& $this->content_object;
1061 if (
$type ==
"PageObject")
1063 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1067 $href =
"./goto.php?target=st_".$target_id;
1072 case "GlossaryItem":
1077 $href =
"term_".$target_id.
".html";
1081 $this->ctrl->setParameter($this,
"term_id",
$target_id);
1082 $href = $this->ctrl->getLinkTarget($this,
"listDefinitions");
1083 $href = str_replace(
"&",
"&", $href);
1088 $href =
"./goto.php?target=git_".$target_id;
1095 $href =
"media_".$target_id.
".html";
1099 $this->ctrl->setParameter($this,
"obj_type",
$type);
1100 $this->ctrl->setParameter($this,
"mob_id",
$target_id);
1101 $href = $this->ctrl->getLinkTarget($this,
"media");
1102 $href = str_replace(
"&",
"&", $href);
1106 case "RepositoryItem":
1109 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1111 $ltarget = $t_frame;
1116 $anc_par =
'Anchor="'.$anc.
'"';
1118 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
1119 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
1121 $this->ctrl->clearParameters($this);
1124 $link_info.=
"</IntLinkInfos>";
1133 function getLink($a_ref_id, $a_cmd =
"", $a_term_id =
"", $a_def_id =
"",
1134 $a_frame =
"", $a_type =
"")
1149 $this->ctrl->setParameter($this,
"def_id", $a_def_id);
1150 $link = $this->ctrl->getLinkTarget($this,
"fullscreen");
1154 $link.=
"&cmd=".$a_cmd;
1157 $this->ctrl->setParameter($this,
"frame", $a_frame);
1159 if ($a_obj_id !=
"")
1164 $this->ctrl->setParameter($this,
"mob_id", $a_obj_id);
1168 $this->ctrl->setParameter($this,
"def_id", $a_def_id);
1174 $this->ctrl->setParameter($this,
"obj_type", $a_type);
1176 $link = $this->ctrl->getLinkTarget($this, $a_cmd);
1185 case "downloadFile":
1189 $link =
"fullscreen.html";
1196 $link =
"term_".$a_obj_id.
".html";
1200 $link =
"media_".$a_obj_id.
".html";
1207 $this->ctrl->clearParameters($this);
1222 $ilTabs->activateTab(
"print_view");
1224 $ilToolbar->setFormAction($ilCtrl->getFormAction($this,
"printView"),
1225 false,
"print_view");
1226 $ilToolbar->addFormButton($lng->txt(
"cont_show_print_view"),
"printView");
1227 $ilToolbar->setCloseFormTag(
false);
1231 $tpl->setContent($this->form->getHTML());
1241 $terms = $this->glossary->getTermList();
1243 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1251 .
" (".$lng->txt(
"cont_terms").
": ".count($terms).
")",
"glossary");
1252 $radg->addOption($op2);
1253 $op3=
new ilRadioOption($lng->txt(
"cont_selected_terms"),
"selection");
1254 $radg->addOption($op3);
1256 include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
1258 $op3->addSubItem($nl);
1260 foreach ($terms as
$t)
1262 $nl->addListNode($t[
"id"], $t[
"term"], 0,
false,
false);
1265 $this->form->addItem($radg);
1267 $this->form->addCommandButton(
"printView", $lng->txt(
"cont_show_print_view"));
1268 $this->form->setCloseTag(
false);
1270 $this->form->setTitle($lng->txt(
"cont_print_selection"));
1283 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1289 switch (
$_POST[
"sel_type"])
1292 $ts = $this->glossary->getTermList();
1295 $terms[] = $t[
"id"];
1300 if (is_array(
$_POST[
"obj_id"]))
1302 $terms =
$_POST[
"obj_id"];
1315 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1316 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1318 $this->tpl->parseCurrentBlock();
1321 $this->tpl->setCurrentBlock(
"ContentStyle");
1322 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1324 $this->tpl->parseCurrentBlock();
1328 foreach ($terms as $t_id)
1332 $tpl->setVariable(
"CONTENT",
'<div class="ilInvisibleBorder">'.$page_content.
'</div>'.
1333 '<script type="text/javascript" language="javascript1.2">
1335 // Do print the page
1336 if (typeof(window.print) != \'undefined\')
1353 $oldoffset = (is_numeric (
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
1357 if ($this->ctrl->getCmd() !=
"listDefinitions")
1359 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1361 $tabs_gui->addTab(
"terms",
1362 $lng->txt(
"cont_terms"),
1363 $ilCtrl->getLinkTarget($this,
"listTerms"));
1366 $tabs_gui->addTab(
"info",
1367 $lng->txt(
"info_short"),
1368 $ilCtrl->getLinkTarget($this,
"infoScreen"));
1370 $tabs_gui->addTab(
"print_view",
1371 $lng->txt(
"cont_print_view"),
1372 $ilCtrl->getLinkTarget($this,
"printViewSelection"));
1375 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1380 if ($this->glossary->isActiveDownloads())
1382 $tabs_gui->addTab(
"download",
1383 $lng->txt(
"download"),
1384 $ilCtrl->getLinkTarget($this,
"showDownloadList"));
1389 if ($ilAccess->checkAccess(
"write",
"", (
int)
$_GET[
"ref_id"]))
1391 $tabs_gui->addNonTabbedLink(
"editing_view",
1392 $lng->txt(
"glo_editing_view"),
1393 "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".(int) $_GET[
"ref_id"],
1400 $this->ctrl->setParameter($this,
"offset",
$_GET[
"offset"]);
1403 $this->ctrl->setParameter($this,
"term",
$_REQUEST[
"term"]);
1404 $this->ctrl->setParameter($this,
"oldoffset",
$_GET[
"oldoffset"]);
1405 $back = $ilCtrl->getLinkTarget($this,
"searchTerms");
1409 $back = $ilCtrl->getLinkTarget($this,
"listTerms");
1411 $tabs_gui->setBackTarget($this->lng->txt(
"obj_glo"), $back);
1417 $tabs_gui->addTarget(
"cont_back",
1418 "index.html#term_".
$_GET[
"term_id"],
"",
1424 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1426 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1437 $this->ctrl->setCmd(
"showSummary");
1438 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1456 global
$ilBench, $ilAccess, $ilTabs;
1459 $ilTabs->activateTab(
"info");
1460 $this->lng->loadLanguageModule(
"meta");
1462 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1465 $info->enablePrivateNotes();
1468 $info->enableNews();
1469 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1471 $info->enableNewsEditing();
1473 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1474 if ($enable_internal_rss)
1476 $info->setBlockProperty(
"news",
"settings",
true);
1481 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1498 $info->addMetaDataSections($this->glossary->getId(),0, $this->glossary->getType());
1500 include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
1505 $this->tpl->setContent($info->getHTML());
1506 return $this->tpl->get();
1511 $this->ctrl->forwardCommand($info);
1525 $ilCtrl->redirect($this,
"listTerms");