5 require_once(
"./Services/Object/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");
79 $this->access = $DIC->access();
80 $this->error = $DIC[
"ilErr"];
81 $this->nav_history = $DIC[
"ilNavigationHistory"];
82 $this->toolbar = $DIC->toolbar();
83 $this->
user = $DIC->user();
84 $this->help = $DIC[
"ilHelp"];
85 $lng = $DIC->language();
88 $ilTabs = $DIC->tabs();
90 $this->tabs_gui = $ilTabs;
94 $this->offline =
false;
95 $this->ctrl->saveParameter($this, array(
"ref_id",
"letter",
"tax_node"));
98 include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
100 $this->glossary = $this->glossary_gui->object;
104 $this->term_id = (int)
$_GET[
"term_id"];
105 $glo_ids = $this->glossary->getAllGlossaryIds();
106 if (!is_array($glo_ids)) {
107 $glo_ids = array($glo_ids);
110 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
112 if ((
int) $this->term_id > 0) {
113 include_once(
"./Modules/Glossary/exceptions/class.ilGlossaryException.php");
120 $this->tax_id = $this->glossary->getTaxonomyId();
121 if ($this->tax_id > 0 && $this->glossary->getShowTaxonomy()) {
122 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
125 if ((
int)
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() !=
$_GET[
"tax_node"]) {
126 $this->tax_node = (int)
$_GET[
"tax_node"];
136 $this->offline = $a_offline;
144 return $this->offline;
152 $this->offline_dir = $a_dir;
161 return $this->offline_dir;
174 $lng->loadLanguageModule(
"content");
176 $next_class = $this->ctrl->getNextClass($this);
177 $cmd = $this->ctrl->getCmd(
"listTerms");
180 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]) &&
181 !($ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"]) &&
182 ($cmd ==
"infoScreen" || strtolower($next_class) ==
"ilinfoscreengui"))) {
186 if ($cmd !=
"listDefinitions") {
190 switch ($next_class) {
196 case "ilinfoscreengui":
200 case "ilpresentationlisttablegui":
202 $this->ctrl->forwardCommand($prtab);
207 $ret = $this->$cmd();
215 $this->tpl->getStandardTemplate();
216 $title = $this->glossary->getTitle();
218 $this->tpl->setTitle(
$title);
239 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
244 $ilNavigationHistory->addItem(
246 $this->ctrl->getLinkTarget($this,
"listTerms"),
251 include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
254 $ai->setFixDBUmlauts(
true);
256 $first_letters = $this->glossary->getFirstLetters($this->tax_node);
257 if (!is_array($first_letters)) {
260 if (!in_array(
$_GET[
"letter"], $first_letters)) {
263 $ai->setLetters($first_letters);
265 $ai->setParentCommand($this,
"chooseLetter");
266 $ai->setHighlighted(
$_GET[
"letter"]);
267 $ilToolbar->addInputItem(
$ai,
true);
271 $ilCtrl->setParameter($this,
"term_id",
"");
273 $ilTabs->activateTab(
"terms");
291 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
295 $this->lng->loadLanguageModule(
"meta");
302 $oldoffset = (is_numeric(
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
304 if ($this->glossary->getPresentationMode() ==
"full_def") {
306 $this->tpl->setCurrentBlock(
"ContentStyle");
308 $this->tpl->setVariable(
309 "LOCATION_CONTENT_STYLESHEET",
313 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
315 $this->tpl->parseCurrentBlock();
318 $this->tpl->setCurrentBlock(
"SyntaxStyle");
320 $this->tpl->setVariable(
321 "LOCATION_SYNTAX_STYLESHEET",
325 $this->tpl->setVariable(
326 "LOCATION_SYNTAX_STYLESHEET",
327 "syntaxhighlight.css" 330 $this->tpl->parseCurrentBlock();
339 $this->tpl->setVariable(
"ADM_CONTENT",
$table->getHTML());
340 return $this->tpl->get();
352 include_once(
"./Modules/Glossary/classes/class.ilPresentationListTableGUI.php");
359 $this->glossary->getTaxonomyId()
372 $prtab->resetOffset();
373 $prtab->writeFilterToSession();
384 $prtab->resetOffset();
385 $prtab->resetFilter();
399 if ($a_ref_id == 0) {
400 $ref_id = (int)
$_GET[
"ref_id"];
404 if ($a_term_id == 0) {
405 $term_id = $this->term_id;
407 $term_id = $a_term_id;
410 if (!$ilAccess->checkAccess(
"read",
"", $ref_id)) {
415 if ($this->glossary->getPresentationMode() !=
"full_def") {
424 require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
425 $tpl->getStandardTemplate();
429 $style_name =
$ilUser->prefs[
"style"] .
".css";
431 $tpl->setVariable(
"LOCATION_STYLESHEET",
"./" . $style_name);
437 $tpl->setCurrentBlock(
"ContentStyle");
440 "LOCATION_CONTENT_STYLESHEET",
444 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content.css");
446 $tpl->parseCurrentBlock();
449 $tpl->setCurrentBlock(
"SyntaxStyle");
452 "LOCATION_SYNTAX_STYLESHEET",
457 "LOCATION_SYNTAX_STYLESHEET",
458 "syntaxhighlight.css" 461 $tpl->parseCurrentBlock();
464 $tpl->setTitle($this->lng->txt(
"cont_term") .
": " . $term->getTerm());
468 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
469 $cmd = array(
"edit" => $this->ctrl->getLinkTargetByClass(array(
"ilglossaryeditorgui",
"ilobjglossarygui",
"ilglossarytermgui",
"ilobjectmetadatagui"),
""));
471 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
473 $tpl->setRightContent($mdgui->getBlockHTML($cmd));
476 $tpl->addBlockfile(
"ADM_CONTENT",
"def_list",
"tpl.glossary_definition_list.html",
"Modules/Glossary");
478 $tpl =
new ilTemplate(
"tpl.glossary_definition_list.html",
true,
true,
"Modules/Glossary");
482 $tpl->setVariable(
"TXT_TERM", $term->getTerm());
483 $this->mobs = array();
487 $tpl->setCurrentBlock(
"toc");
488 for ($j = 1; $j <= count($defs); $j++) {
489 $tpl->setCurrentBlock(
"toc_item");
490 $tpl->setVariable(
"TOC_DEF_NR", $j);
491 $tpl->setVariable(
"TOC_DEF",
$lng->txt(
"cont_definition"));
492 $tpl->parseCurrentBlock();
494 $tpl->setCurrentBlock(
"toc");
495 $tpl->parseCurrentBlock();
498 for ($j = 0; $j < count($defs); $j++) {
501 $page_gui->setGlossary($this->glossary);
502 $page_gui->setOutputMode($a_page_mode);
503 $page_gui->setStyleId($this->glossary->getStyleSheetId());
504 $page = $page_gui->getPageObject();
508 $int_links = $page->getInternalLinks();
510 $page_gui->setLinkXML($link_xml);
513 $page_gui->setOutputMode(
"offline");
516 $page_gui->setSourcecodeDownloadScript($this->
getLink($ref_id));
517 $page_gui->setFullscreenLink($this->
getLink($ref_id,
"fullscreen", $term_id,
$def[
"id"]));
519 $page_gui->setTemplateOutput(
false);
520 $page_gui->setRawPageContent(
true);
521 $page_gui->setFileDownloadLink($this->
getLink($ref_id,
"downloadFile"));
523 $output = $page_gui->showPage();
525 $output = $page_gui->presentation($page_gui->getOutputMode());
528 if (count($defs) > 1) {
529 $tpl->setCurrentBlock(
"definition_header");
532 $this->lng->txt(
"cont_definition") .
" " . ($j + 1)
534 $tpl->setVariable(
"DEF_NR", ($j + 1));
535 $tpl->parseCurrentBlock();
538 $tpl->setCurrentBlock(
"definition");
540 $tpl->parseCurrentBlock();
547 $backlist_shown =
false;
548 foreach ($sources as $src) {
549 $type = explode(
':', $src[
'type']);
551 if (
$type[0] ==
'lm') {
552 if (
$type[1] ==
'pg') {
556 $tpl->setCurrentBlock(
'backlink_item');
559 foreach ($ref_ids as $rid) {
560 if ($ilAccess->checkAccess(
"read",
"", $rid)) {
565 $tpl->setCurrentBlock(
"backlink_item");
566 $tpl->setVariable(
"BACKLINK_LINK", ILIAS_HTTP_PATH .
"/goto.php?target=" .
$type[1] .
"_" . $src[
'id']);
567 $tpl->setVariable(
"BACKLINK_ITEM", $lm_title .
": " .
$title);
568 $tpl->parseCurrentBlock();
569 $backlist_shown =
true;
574 if ($backlist_shown) {
575 $tpl->setCurrentBlock(
"backlink_list");
576 $tpl->setVariable(
"BACKLINK_TITLE", $this->lng->txt(
'glo_term_used_in'));
577 $tpl->parseCurrentBlock();
582 $tpl->setCurrentBlock(
"perma_link");
583 $tpl->setVariable(
"PERMA_LINK", ILIAS_HTTP_PATH .
584 "/goto.php?target=" .
586 "_" . $term_id .
"_" . $ref_id .
"&client_id=" . CLIENT_ID);
587 $tpl->setVariable(
"TXT_PERMA_LINK", $this->lng->txt(
"perma_link"));
588 $tpl->setVariable(
"PERMA_TARGET",
"_top");
589 $tpl->parseCurrentBlock();
597 include_once
'./Services/Search/classes/class.ilUserSearchCache.php';
600 $search_string = $cache->getQuery();
602 include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
603 include_once(
"./Services/Search/classes/class.ilQueryParser.php");
607 $words = $p->getQuotedWords();
608 if (is_array($words)) {
609 foreach ($words as
$w) {
613 $this->fill_on_load_code =
true;
635 $ilHelp->setScreenIdComponent(
"glo");
637 $ilCtrl->setParameter($this,
"term_id",
"");
638 $this->ctrl->setParameter($this,
"offset",
$_GET[
"offset"]);
639 if (!empty($_REQUEST[
"term"])) {
640 $this->ctrl->setParameter($this,
"term", $_REQUEST[
"term"]);
641 $this->ctrl->setParameter($this,
"oldoffset",
$_GET[
"oldoffset"]);
642 $back =
$ilCtrl->getLinkTarget($this,
"searchTerms");
644 $back =
$ilCtrl->getLinkTarget($this,
"listTerms");
646 $ilCtrl->setParameter($this,
"term_id", $this->term_id);
647 $ilCtrl->saveParameter($this,
"term_id");
649 $ilTabs->setBackTarget($this->lng->txt(
"obj_glo"), $back);
653 $lng->txt(
"content"),
654 $ilCtrl->getLinkTarget($this,
"listDefinitions")
659 $lng->txt(
"print_view"),
660 $ilCtrl->getLinkTarget($this,
"printViewSelection")
663 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
"term_id", $this->term_id);
664 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
666 $ilTabs->addNonTabbedLink(
668 $lng->txt(
"glo_editing_view"),
669 $ilCtrl->getLinkTargetByClass(array(
"ilglossaryeditorgui",
"ilobjglossarygui",
"ilglossarytermgui"),
"listDefinitions")
673 $ilTabs->activateTab($a_act);
690 public function media($a_mode =
"media")
692 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
693 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
695 $this->tpl->setVariable(
696 "LOCATION_CONTENT_STYLESHEET",
708 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
719 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
720 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
727 $enlarge_path =
"images/enlarge.svg";
733 $this->ctrl->setParameter($this,
"obj_type",
"MediaObject");
736 $this->ctrl->clearParameters($this);
738 $params = array(
'mode' => $mode,
'enlarge_path' => $enlarge_path,
739 'link_params' =>
"ref_id=" .
$_GET[
"ref_id"],
'fullscreen_link' => $fullscreen_link,
740 'ref_id' =>
$_GET[
"ref_id"],
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
741 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", null, $args,
$params);
746 $this->tpl->setVariable(
"MEDIA_CONTENT",
$output);
748 $this->tpl->parseCurrentBlock();
750 $html = $this->tpl->get();
764 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
768 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.glo_download_list.html",
"Modules/Glossary");
771 $ilTabs->activateTab(
"download");
774 $this->tpl->setTitle($this->glossary->getTitle());
778 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
782 $this->tpl->addBlockfile(
"DOWNLOAD_TABLE",
"download_table",
"tpl.table.html");
785 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/Glossary");
787 $export_files = array();
788 $types = array(
"xml",
"html");
789 foreach ($types as
$type) {
790 if ($this->glossary->getPublicExportFile($type) !=
"") {
791 $dir = $this->glossary->getExportDirectory($type);
792 if (is_file($this->glossary->getExportDirectory($type) .
"/" .
793 $this->glossary->getPublicExportFile($type))) {
794 $size = filesize($this->glossary->getExportDirectory($type) .
"/" .
795 $this->glossary->getPublicExportFile($type));
796 $export_files[] = array(
"type" => $type,
797 "file" => $this->glossary->getPublicExportFile($type),
805 $tbl->setTitle($this->lng->txt(
"download"));
807 $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
808 $this->lng->txt(
"cont_file"),
809 $this->lng->txt(
"size"), $this->lng->txt(
"date"),
812 $cols = array(
"format",
"file",
"size",
"date",
"download");
813 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
814 "cmd" =>
"showDownloadList",
"cmdClass" => strtolower(get_class($this)));
815 $tbl->setHeaderVars(
$cols, $header_params);
816 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
817 $tbl->disable(
"sort");
821 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
824 $tbl->setMaxCount($this->maxcount);
830 $tbl->disable(
"footer");
832 $tbl->setMaxCount(count($export_files));
833 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
836 if (count($export_files) > 0) {
838 foreach ($export_files as $exp_file) {
839 $this->tpl->setCurrentBlock(
"tbl_content");
840 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
843 $this->tpl->setVariable(
"CSS_ROW", $css_row);
845 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
846 $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
847 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"] .
":" . $exp_file[
"file"]);
849 $file_arr = explode(
"__", $exp_file[
"file"]);
850 $this->tpl->setVariable(
"TXT_DATE", date(
"Y-m-d H:i:s", $file_arr[0]));
852 $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
853 $this->ctrl->setParameter($this,
"type", $exp_file[
"type"]);
854 $this->tpl->setVariable(
856 $this->ctrl->getLinkTarget($this,
"downloadExportFile")
859 $this->tpl->parseCurrentBlock();
863 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
864 $this->tpl->setVariable(
"NUM_COLS", 5);
865 $this->tpl->parseCurrentBlock();
880 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
881 $ilErr->raiseError(
$lng->txt(
"permission_denied"),
$ilErr->error_obj->MESSAGE);
884 $file = $this->glossary->getPublicExportFile(
$_GET[
"type"]);
885 if ($this->glossary->getPublicExportFile(
$_GET[
"type"]) !=
"") {
886 $dir = $this->glossary->getExportDirectory(
$_GET[
"type"]);
887 if (is_file($dir .
"/" . $file)) {
892 $ilErr->raiseError($this->lng->txt(
"file_not_found"),
$ilErr->MESSAGE);
905 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
907 $gloss_loc->setMode(
"presentation");
908 if (!empty($this->term_id)) {
910 $gloss_loc->setTerm($term);
912 $gloss_loc->setGlossary($this->glossary);
914 $gloss_loc->display();
926 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
930 $file = explode(
"_",
$_GET[
"file_id"]);
931 include_once(
"./Modules/File/classes/class.ilObjFile.php");
932 $fileObj =
new ilObjFile($file[count($file) - 1],
false);
933 $fileObj->sendFile();
950 if ($a_layoutframes ==
"") {
951 $a_layoutframes = array();
953 $link_info =
"<IntLinkInfos>";
954 foreach ($a_int_links as $int_link) {
957 if (substr(
$target, 0, 4) ==
"il__") {
960 $type = $int_link[
"Type"];
961 $targetframe = ($int_link[
"TargetFrame"] !=
"")
962 ? $int_link[
"TargetFrame"]
966 $anc = $anc_add =
"";
967 if ($int_link[
"Anchor"] !=
"") {
968 $anc = $int_link[
"Anchor"];
969 $anc_add =
"_" . rawurlencode($int_link[
"Anchor"]);
972 if ($targetframe ==
"New") {
980 case "StructureObject":
982 $cont_obj = $this->content_object;
983 if (
$type ==
"PageObject") {
984 $href =
"./goto.php?target=pg_" .
$target_id . $anc_add;
996 $this->ctrl->setParameter($this,
"term_id",
$target_id);
997 $href = $this->ctrl->getLinkTarget($this,
"listDefinitions");
998 $href = str_replace(
"&",
"&", $href);
1001 $href =
"./goto.php?target=git_" .
$target_id;
1009 $this->ctrl->setParameter($this,
"obj_type",
$type);
1010 $this->ctrl->setParameter($this,
"mob_id",
$target_id);
1011 $href = $this->ctrl->getLinkTarget($this,
"media");
1012 $href = str_replace(
"&",
"&", $href);
1016 case "RepositoryItem":
1019 $href =
"./goto.php?target=" . $obj_type .
"_" .
$target_id;
1021 $ltarget = $t_frame;
1025 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1031 if ($obj_type ==
"usr") {
1032 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1033 $back = $this->ctrl->getLinkTarget($this,
"listDefinitions");
1035 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id",
$target_id);
1036 $this->ctrl->setParameterByClass(
1037 "ilpublicuserprofilegui",
1042 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1044 $href = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
1046 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id",
"");
1053 $anc_par =
'Anchor="' . $anc .
'"';
1055 $link_info .=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " .
1056 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" $anc_par/>";
1058 $this->ctrl->clearParameters($this);
1061 $link_info .=
"</IntLinkInfos>";
1088 $this->ctrl->setParameter($this,
"def_id", $a_def_id);
1089 $link = $this->ctrl->getLinkTarget($this,
"fullscreen");
1093 $link .=
"&cmd=" . $a_cmd;
1094 if ($a_frame !=
"") {
1095 $this->ctrl->setParameter($this,
"frame", $a_frame);
1097 if ($a_obj_id !=
"") {
1100 $this->ctrl->setParameter($this,
"mob_id", $a_obj_id);
1104 $this->ctrl->setParameter($this,
"def_id", $a_def_id);
1109 $this->ctrl->setParameter($this,
"obj_type",
$a_type);
1111 $link = $this->ctrl->getLinkTarget($this, $a_cmd);
1117 case "downloadFile":
1121 $link =
"fullscreen.html";
1128 $link =
"term_" . $a_obj_id .
".html";
1132 $link =
"media_" . $a_obj_id .
".html";
1139 $this->ctrl->clearParameters($this);
1158 $ilCtrl->saveParameter($this,
"term_id");
1160 if ((
int) $this->term_id == 0) {
1162 $ilTabs->activateTab(
"print_view");
1166 $tpl->setTitle($this->lng->txt(
"cont_term") .
": " . $term->getTerm());
1172 $tpl->setContent($this->form->getHTML());
1183 $terms = $this->glossary->getTermList();
1185 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1187 $this->form->setTarget(
"print_view");
1188 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
1195 if ((
int) $this->term_id > 0) {
1197 $radg->addOption($op1);
1203 .
" (" .
$lng->txt(
"cont_terms") .
": " . count($terms) .
")",
"glossary");
1204 $radg->addOption($op2);
1207 if (($t_id = $this->glossary->getTaxonomyId()) > 0 && $this->glossary->getShowTaxonomy()) {
1209 $radg->addOption($op4);
1212 include_once(
"./Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php");
1216 $lng->txt(
"cont_topic"),
1220 if ($this->tax_node > 0) {
1221 $si->setValue((
int) $this->tax_node);
1223 $op4->addSubItem(
$si);
1228 $radg->addOption($op3);
1230 include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
1232 $op3->addSubItem($nl);
1234 foreach ($terms as
$t) {
1235 $nl->addListNode($t[
"id"], $t[
"term"], 0,
false,
false);
1238 $this->form->addItem($radg);
1240 $this->form->addCommandButton(
"printView",
$lng->txt(
"cont_show_print_view"));
1241 $this->form->setPreventDoubleSubmission(
false);
1243 $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
1257 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
1262 switch (
$_POST[
"sel_type"]) {
1264 $ts = $this->glossary->getTermList();
1265 foreach ($ts as
$t) {
1266 $terms[] = $t[
"id"];
1271 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1272 $t_id = $this->glossary->getTaxonomyId();
1274 foreach ($items as
$i) {
1275 if ($i[
"item_type"] ==
"term") {
1276 $terms[] = $i[
"item_id"];
1282 if (is_array(
$_POST[
"obj_id"])) {
1283 $terms =
$_POST[
"obj_id"];
1290 $terms = array($this->term_id);
1310 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1315 foreach ($terms as $t_id) {
1318 $tpl->setVariable(
"CONTENT", $page_content .
1319 '<script type="text/javascript" language="javascript1.2"> 1321 il.Util.addOnLoad(function () { 1340 $ilHelp->setScreenIdComponent(
"glo");
1342 $oldoffset = (is_numeric(
$_GET[
"oldoffset"]))?
$_GET[
"oldoffset"]:
$_GET[
"offset"];
1345 if ($this->ctrl->getCmd() !=
"listDefinitions") {
1346 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
1347 $this->tabs_gui->addTab(
1349 $lng->txt(
"cont_terms"),
1350 $ilCtrl->getLinkTarget($this,
"listTerms")
1354 $this->tabs_gui->addTab(
1356 $lng->txt(
"info_short"),
1357 $ilCtrl->getLinkTarget($this,
"infoScreen")
1360 $this->tabs_gui->addTab(
1362 $lng->txt(
"cont_print_view"),
1363 $ilCtrl->getLinkTarget($this,
"printViewSelection")
1367 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
1371 if ($this->glossary->isActiveDownloads()) {
1372 $this->tabs_gui->addTab(
1374 $lng->txt(
"download"),
1375 $ilCtrl->getLinkTarget($this,
"showDownloadList")
1381 if ($ilAccess->checkAccess(
"write",
"", (
int)
$_GET[
"ref_id"]) ||
1382 $ilAccess->checkAccess(
"edit_content",
"", (
int) $_GET[
"ref_id"])) {
1383 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1384 $this->tabs_gui->addNonTabbedLink(
1386 $lng->txt(
"glo_editing_view"),
1387 "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . (int) $_GET[
"ref_id"],
1393 $this->tabs_gui->addTarget(
1395 "index.html#term_" . $this->term_id,
1404 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPage.php");
1406 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1417 $this->ctrl->setCmd(
"showSummary");
1418 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1440 $ilTabs->activateTab(
"info");
1441 $this->lng->loadLanguageModule(
"meta");
1443 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1446 $info->enablePrivateNotes();
1449 $info->enableNews();
1450 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
1451 $info->enableNewsEditing();
1453 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1454 if ($enable_internal_rss) {
1455 $info->setBlockProperty(
"news",
"settings",
true);
1460 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
1476 $info->addMetaDataSections($this->glossary->getId(), 0, $this->glossary->getType());
1478 include_once(
"./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
1482 $this->tpl->setContent(
$info->getHTML());
1483 return $this->tpl->get();
1486 $this->ctrl->forwardCommand(
$info);
1500 $ilCtrl->redirect($this,
"listTerms");
1513 if (!$this->
offlineMode() && $this->glossary->getShowTaxonomy()) {
1514 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1516 if (count($tax_ids) > 0) {
1517 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1522 "ilglossarypresentationgui",
1525 if (!$tax_exp->handleCommand()) {
1527 $tpl->setLeftContent($tax_exp->getHTML() .
" ");
1532 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
1535 "ilglossarypresentationgui",
1537 $lng->txt(
"cont_all_topics")
This class represents an option in a radio group.
static getContentPrintStyle()
get content print style
static getDefinitionList($a_term_id)
static
Class ilGlossaryPresentationGUI.
getOfflineDirectory()
Get offline directory.
__construct()
Constructor public.
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
getLinkXML($a_int_links)
get link targets
initPrintViewSelectionForm()
Init print view selection form.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
applyFilter()
Apply filter.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
getLink( $a_ref_id, $a_cmd="", $a_term_id="", $a_def_id="", $a_frame="", $a_type="")
handles links for learning module presentation
chooseLetter()
Choose first letter.
setOfflineMode($a_offline=true)
set offline mode (content is generated for offline package)
executeCommand()
execute command
setLocator($a_tree="", $a_id="")
set Locator
Term list table for presentation mode.
Taxonomy explorer GUI class.
downloadFile()
download file of file lists
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static _lookupTitle($a_id)
lookup object title
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static _getAllReferences($a_id)
get all reference ids of object
fullscreen()
show fullscreen view
static _getInstance($a_usr_id)
Get singleton instance.
static getTreeHTML( $a_tax_id, $a_class, $a_cmd, $a_target_class, $a_target_cmd, $a_root_node_title="")
Get tree html.
setValue($a_value)
Set Value.
static hasPublicProfile($a_user_id)
Has public profile.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setOfflineDirectory($a_dir)
Set offline directory.
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
static addUsagesToInfo($info, $glo_id)
Add usages to info.
listTerms()
List all terms.
static _getSourcesOfTarget($a_target_type, $a_target_id, $a_target_inst)
get all sources of a link target
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Glossary definition page object.
static _lookupType($a_id, $a_reference=false)
lookup object type
listTermByGiven()
list glossary terms
static _lookGlossaryID($term_id)
get glossary id form term id
const IL_PAGE_PRESENTATION
media($a_mode="media")
show media object
static _getPresentationTitle( $a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
outputInfoScreen()
info screen call from inside learning module
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
offlineMode()
checks wether offline content generation is activated
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
Glossary definition page GUI class.
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
showTaxonomy()
Show taxonomy.
if(empty($password)) $table
getPresentationTable()
Get presentation table.
showDownloadList()
show download list
static getSubTreeItems($a_comp, $a_obj_id, $a_item_type, $a_tax_id, $a_node)
Get all assigned items under a node.
static getWebspaceDir($mode="filesystem")
get webspace directory
listDefinitions($a_ref_id=0, $a_term_id=0, $a_get_html=false, $a_page_mode=IL_PAGE_PRESENTATION)
list definitions of a term
showDefinitionTabs($a_act)
Definitions tabs.
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
downloadExportFile()
send download file (xml/html)
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static getGotoForWikiPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
printViewSelection()
Print view selection.