ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilGlossaryTermGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
5require_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
6
18{
19 var $ilias;
20 var $lng;
21 var $tpl;
23 var $term;
25
30 function ilGlossaryTermGUI($a_id = 0)
31 {
32 global $lng, $ilias, $tpl, $ilCtrl;
33
34 $this->lng =& $lng;
35 $this->ilias =& $ilias;
36 $this->tpl =& $tpl;
37 $this->ctrl =& $ilCtrl;
38 $this->ctrl->saveParameter($this, array("term_id"));
39
40 if($a_id != 0)
41 {
42 $this->term =& new ilGlossaryTerm($a_id);
43 }
44 }
45
49 function executeCommand()
50 {
51 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd();
53
54 switch ($next_class)
55 {
56
57 case "iltermdefinitioneditorgui":
58 //$this->ctrl->setReturn($this, "listDefinitions");
59 $def_edit =& new ilTermDefinitionEditorGUI();
60 //$ret =& $def_edit->executeCommand();
61 $ret =& $this->ctrl->forwardCommand($def_edit);
62 $this->quickList("edit", $def_edit);
63 break;
64
65 case "ilpropertyformgui";
66 $form = $this->getEditTermForm();
67 $this->ctrl->forwardCommand($form);
68 break;
69
70 default:
71 $ret =& $this->$cmd();
72 break;
73 }
74 }
75
81 function setOfflineDirectory ($offdir) {
82 $this->offline_directory = $offdir;
83 }
84
85
90 function getOfflineDirectory () {
91 return $this->offline_directory;
92 }
93
94
95 function setGlossary($a_glossary)
96 {
97 $this->glossary = $a_glossary;
98 }
99
100 function setLinkXML($a_link_xml)
101 {
102 $this->link_xml = $a_link_xml;
103 }
104
105 function getLinkXML()
106 {
107 return $this->link_xml;
108 }
109
113 function create()
114 {
115 // deprecated
116 }
117
121 function saveTerm()
122 {
123 // deprecated
124 }
125
126
130 function editTerm()
131 {
132 global $ilTabs, $ilCtrl;
133
134 $this->getTemplate();
135 $this->displayLocator();
136 $this->setTabs();
137 $ilTabs->activateTab("properties");
138
139 $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
140 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
141
142 $form = $this->getEditTermForm();
143
144 $this->tpl->setContent($ilCtrl->getHTML($form));
145
146 $this->quickList();
147 }
148
156 {
157 global $ilTabs, $ilCtrl;
158
159 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
160 $form = new ilPropertyFormGUI();
161 $form->setFormAction($this->ctrl->getFormAction($this, "updateTerm"));
162 $form->setTitle($this->lng->txt("cont_edit_term"));
163
164 $term = new ilTextInputGUI($this->lng->txt("cont_term"), "term");
165 $term->setRequired(true);
166 $term->setValue($this->term->getTerm());
167 $form->addItem($term);
168
169 $lang = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
170 $lang->setRequired(true);
172 $lang->setValue($this->term->getLanguage());
173 $form->addItem($lang);
174
175 // taxonomy
176 if ($this->glossary->getTaxonomyId() > 0)
177 {
178 include_once("./Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php");
179 $tax_node_assign = new ilTaxSelectInputGUI($this->glossary->getTaxonomyId(), "tax_node", true);
180
181 include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
182 $ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
183 $assgnmts = $ta->getAssignmentsOfItem($this->term->getId());
184 $node_ids = array();
185 foreach ($assgnmts as $a)
186 {
187 $node_ids[] = $a["node_id"];
188 }
189 $tax_node_assign->setValue($node_ids);
190
191 $form->addItem($tax_node_assign);
192
193 }
194
195 // advanced metadata
196 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
197 $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'glo',$this->glossary->getId(),'term',
198 $this->term->getId());
199 $this->record_gui->setPropertyForm($form);
200 $this->record_gui->setSelectedOnly(true);
201 $this->record_gui->parse();
202
203 $form->addCommandButton("updateTerm", $this->lng->txt("save"));
204
205 return $form;
206 }
207
208
209
213 function updateTerm()
214 {
215 // update term
216 $this->term->setTerm(ilUtil::stripSlashes($_POST["term"]));
217 $this->term->setLanguage($_POST["term_language"]);
218 $this->term->update();
219
220 // update taxonomy assignment
221 if ($this->glossary->getTaxonomyId() > 0)
222 {
223 include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
224 $ta = new ilTaxNodeAssignment("glo", $this->glossary->getId(), "term", $this->glossary->getTaxonomyId());
225 $ta->deleteAssignmentsOfItem($this->term->getId());
226 if (is_array($_POST["tax_node"]))
227 {
228 foreach ($_POST["tax_node"] as $node_id)
229 {
230 $ta->addAssignment($node_id, $this->term->getId());
231 }
232 }
233
234 }
235
236 // advanced metadata
237 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
239 'glo',$this->glossary->getId(),'term', $this->term->getId());
240
241 // :TODO: proper validation
242 $form = $this->getEditTermForm();
243 $form->checkInput();
244
245 if($this->record_gui->importEditFormPostValues())
246 {
247 $this->record_gui->writeEditForm();
248 }
249
250 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
251 $this->ctrl->redirect($this, "editTerm");
252 }
253
260 function getOverlayHTML($a_close_el_id, $a_glo_ov_id = "", $a_lang = "", $a_outputmode = "offline")
261 {
262 global $lng;
263
264 if ($a_lang == "")
265 {
266 $a_lang = $lng->getLangKey();
267 }
268
269 $tpl = new ilTemplate("tpl.glossary_overlay.html", true, true, "Modules/Glossary");
270// $this->output(true, $tpl);
271 if ($a_outputmode == "preview")
272 {
273 $a_outputmode = "presentation";
274 }
275 if ($a_outputmode == "offline")
276 {
277 $this->output(true, $tpl, $a_outputmode);
278 }
279 else
280 {
281 $this->output(false, $tpl, $a_outputmode);
282 }
283 if ($a_glo_ov_id != "")
284 {
285 $tpl->setCurrentBlock("glovlink");
286 $tpl->setVariable("TXT_LINK", $lng->txtlng("content", "cont_sco_glossary", $a_lang));
287 $tpl->setVariable("ID_LINK", $a_glo_ov_id);
288 $tpl->parseCurrentBlock();
289 }
290 $tpl->setVariable("TXT_CLOSE", $lng->txtlng("common", "close", $a_lang));
291 $tpl->setVariable("ID_CLOSE", $a_close_el_id);
292 return $tpl->get();
293 }
294
300 function output($a_offline = false, $a_tpl = "", $a_outputmode = "presentation")
301 {
302 if ($a_tpl != "")
303 {
304 $tpl = $a_tpl;
305 }
306 else
307 {
309 }
310
311 require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
312 require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
313
314 $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
315
316 $tpl->setVariable("TXT_TERM", $this->term->getTerm());
317
318 for($j=0; $j<count($defs); $j++)
319 {
320 $def = $defs[$j];
321 $page_gui = new ilGlossaryDefPageGUI($def["id"]);
322 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
323 if (!$a_offline)
324 {
325 //$page_gui->setFullscreenLink(
326 // "ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=".$_GET["ref_id"]);
327 }
328 else
329 {
330 $page_gui->setFullscreenLink("fullscreen.html"); // id is set by xslt
331 }
332 $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=downloadFile&amp;ref_id=".$_GET["ref_id"]);
333
334 if (!$a_offline)
335 {
336 $page_gui->setOutputMode($a_outputmode);
337 }
338 else
339 {
340 $page_gui->setOutputMode("offline");
341 $page_gui->setOfflineDirectory($this->getOfflineDirectory());
342 }
343
344 //$page_gui->setOutputMode("edit");
345 //$page_gui->setPresentationTitle($this->term->getTerm());
346 $page_gui->setLinkXML($this->getLinkXML());
347 $page_gui->setTemplateOutput(false);
348 $output = $page_gui->presentation($page_gui->getOutputMode());
349
350 if (count($defs) > 1)
351 {
352 $tpl->setCurrentBlock("definition_header");
353 $tpl->setVariable("TXT_DEFINITION",
354 $this->lng->txt("cont_definition")." ".($j+1));
355 $tpl->parseCurrentBlock();
356 }
357
359
360 $tpl->setCurrentBlock("definition");
361 $tpl->setVariable("PAGE_CONTENT", $output);
362 $tpl->parseCurrentBlock();
363 }
364 }
365
370 {
371 require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
372 require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
373
374 $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
375
376 $term_links = array();
377 for($j=0; $j<count($defs); $j++)
378 {
379 $def = $defs[$j];
380 $page = new ilGlossaryDefPage($def["id"]);
381 $page->buildDom();
382 $page_links = $page->getInternalLinks();
383 foreach($page_links as $key => $page_link)
384 {
385 $term_links[$key] = $page_link;
386 }
387 }
388
389 return $term_links;
390 }
391
396 {
397 global $ilTabs;
398
399 $this->getTemplate();
400 $this->displayLocator();
401 $this->setTabs();
402 $ilTabs->activateTab("definitions");
403 require_once("./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
404
405 // content style
406 $this->tpl->setCurrentBlock("ContentStyle");
407 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
408 ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
409 $this->tpl->parseCurrentBlock();
410
411 // syntax style
412 $this->tpl->setCurrentBlock("SyntaxStyle");
413 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
415 $this->tpl->parseCurrentBlock();
416
417 // load template for table
418 $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
419 //$this->tpl->addBlockfile("CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
420 //ilUtil::sendInfo();
421 $this->tpl->addBlockfile("STATUSLINE", "statusline", "tpl.statusline.html");
422 $this->tpl->setTitle(
423 $this->lng->txt("cont_term").": ".$this->term->getTerm());
424 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
425
426 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
427
428 $this->tpl->setCurrentBlock("add_def");
429 $this->tpl->setVariable("TXT_ADD_DEFINITION",
430 $this->lng->txt("cont_add_definition"));
431 $this->tpl->setVariable("BTN_ADD", "addDefinition");
432 $this->tpl->parseCurrentBlock();
433 $this->tpl->setCurrentBlock("def_list");
434
436
437 $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
438
439 for($j=0; $j<count($defs); $j++)
440 {
441 $def = $defs[$j];
442 $page_gui = new ilGlossaryDefPageGUI($def["id"]);
443 $page_gui->setStyleId($this->glossary->getStyleSheetId());
444 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
445 $page_gui->setTemplateOutput(false);
446 $output = $page_gui->preview();
447
448 if (count($defs) > 1)
449 {
450 $this->tpl->setCurrentBlock("definition_header");
451 $this->tpl->setVariable("TXT_DEFINITION",
452 $this->lng->txt("cont_definition")." ".($j+1));
453 $this->tpl->parseCurrentBlock();
454 }
455
456 if ($j > 0)
457 {
458 $this->tpl->setCurrentBlock("up");
459 $this->tpl->setVariable("TXT_UP", $this->lng->txt("up"));
460 $this->ctrl->setParameter($this, "def", $def["id"]);
461 $this->tpl->setVariable("LINK_UP",
462 $this->ctrl->getLinkTarget($this, "moveUp"));
463 $this->tpl->parseCurrentBlock();
464 }
465
466 if ($j+1 < count($defs))
467 {
468 $this->tpl->setCurrentBlock("down");
469 $this->tpl->setVariable("TXT_DOWN", $this->lng->txt("down"));
470 $this->ctrl->setParameter($this, "def", $def["id"]);
471 $this->tpl->setVariable("LINK_DOWN",
472 $this->ctrl->getLinkTarget($this, "moveDown"));
473 $this->tpl->parseCurrentBlock();
474 }
475 $this->tpl->setCurrentBlock("submit_btns");
476 $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
477 $this->ctrl->setParameter($this, "def", $def["id"]);
478 $this->ctrl->setParameterByClass("ilTermDefinitionEditorGUI", "def", $def["id"]);
479 $this->tpl->setVariable("LINK_EDIT",
480 $this->ctrl->getLinkTargetByClass(array("ilTermDefinitionEditorGUI", "ilGlossaryDefPageGUI"), "edit"));
481 $this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
482 $this->tpl->setVariable("LINK_DELETE",
483 $this->ctrl->getLinkTarget($this, "confirmDefinitionDeletion"));
484 $this->tpl->parseCurrentBlock();
485
486 $this->tpl->setCurrentBlock("definition");
487 $this->tpl->setVariable("PAGE_CONTENT", $output);
488 $this->tpl->parseCurrentBlock();
489 }
490 //$this->tpl->setCurrentBlock("def_list");
491 //$this->tpl->parseCurrentBlock();
492
493 $this->quickList();
494 }
495
496
501 {
502 global $ilTabs;
503
504 $this->getTemplate();
505 $this->displayLocator();
506 $this->setTabs();
507 $ilTabs->activateTab("definitions");
508
509 // content style
510 $this->tpl->setCurrentBlock("ContentStyle");
511 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
512 ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
513 $this->tpl->parseCurrentBlock();
514
515 // syntax style
516 $this->tpl->setCurrentBlock("SyntaxStyle");
517 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
519 $this->tpl->parseCurrentBlock();
520
521 $this->tpl->setTitle(
522 $this->lng->txt("cont_term").": ".$this->term->getTerm());
523 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
524
525 $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_delete.html", true);
526 ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
527
528 $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
529
530 $definition =& new ilGlossaryDefinition($_GET["def"]);
531 $page_gui = new ilGlossaryDefPageGUI($definition->getId());
532 $page_gui->setTemplateOutput(false);
533 $page_gui->setStyleId($this->glossary->getStyleSheetId());
534 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
535 $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
536 $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
537 $output = $page_gui->preview();
538
539 $this->tpl->setCurrentBlock("definition");
540 $this->tpl->setVariable("PAGE_CONTENT", $output);
541 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
542 $this->tpl->setVariable("LINK_CANCEL",
543 $this->ctrl->getLinkTarget($this, "cancelDefinitionDeletion"));
544 $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("confirm"));
545 $this->ctrl->setParameter($this, "def", $definition->getId());
546 $this->tpl->setVariable("LINK_CONFIRM",
547 $this->ctrl->getLinkTarget($this, "deleteDefinition"));
548 $this->tpl->parseCurrentBlock();
549 }
550
552 {
553 $this->ctrl->redirect($this, "listDefinitions");
554 }
555
556
558 {
559 $definition =& new ilGlossaryDefinition($_GET["def"]);
560 $definition->delete();
561 $this->ctrl->redirect($this, "listDefinitions");
562 }
563
564
568 function moveUp()
569 {
570 $definition =& new ilGlossaryDefinition($_GET["def"]);
571 $definition->moveUp();
572 $this->ctrl->redirect($this, "listDefinitions");
573 }
574
575
579 function moveDown()
580 {
581 $definition =& new ilGlossaryDefinition($_GET["def"]);
582 $definition->moveDown();
583 $this->ctrl->redirect($this, "listDefinitions");
584 }
585
586
590 function addDefinition()
591 {
592 global $ilTabs;
593
594 $this->getTemplate();
595 $this->displayLocator();
596 $this->setTabs();
597 $ilTabs->activateTab("definitions");
598
599 $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
600 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
601
602 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
603 $form = new ilPropertyFormGUI();
604 $form->setFormAction($this->ctrl->getFormAction($this, "saveDefinition"));
605 $form->setTitle($this->lng->txt("gdf_new"));
606
607 $title = new ilTextInputGUI($this->lng->txt("title"), "title");
608 $title->setRequired(true);
609 $form->addItem($title);
610
611 $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
612 $form->addItem($desc);
613
614 $form->addCommandButton("saveDefinition", $this->lng->txt("gdf_add"));
615 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
616
617 $this->tpl->setContent($form->getHTML());
618 }
619
623 function cancel()
624 {
625 $this->ctrl->redirect($this, "listDefinitions");
626 }
627
631 function saveDefinition()
632 {
633 $def =& new ilGlossaryDefinition();
634 $def->setTermId($_GET["term_id"]);
635 $def->setTitle(ilUtil::stripSlashes($_POST["title"]));#"content object ".$newObj->getId()); // set by meta_gui->save
636 $def->setDescription(ilUtil::stripSlashes($_POST["desc"])); // set by meta_gui->save
637 $def->create();
638
639 $this->ctrl->redirect($this, "listDefinitions");
640 }
641
642
646 function getTemplate()
647 {
648 $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
649 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
650 }
651
655 function setTabs()
656 {
657 global $ilTabs;
658 $this->getTabs($ilTabs);
659 }
660
664 function displayLocator()
665 {
666 require_once ("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
667 $gloss_loc =& new ilGlossaryLocatorGUI();
668 $gloss_loc->setTerm($this->term);
669 $gloss_loc->setGlossary($this->glossary);
670 //$gloss_loc->setDefinition($this->definition);
671 $gloss_loc->display();
672 }
673
674
678 function getTabs(&$tabs_gui)
679 {
680 global $lng, $ilHelp;
681
682
683 $ilHelp->setScreenIdComponent("glo_term");
684
685//echo ":".$_GET["term_id"].":";
686 if ($_GET["term_id"] != "")
687 {
688 $tabs_gui->addTab("properties",
689 $lng->txt("term"),
690 $this->ctrl->getLinkTarget($this, "editTerm"));
691
692 $tabs_gui->addTab("definitions",
693 $lng->txt("cont_definitions"),
694 $this->ctrl->getLinkTarget($this, "listDefinitions"));
695
696 $tabs_gui->addTab("usage",
697 $lng->txt("cont_usage")." (".ilGlossaryTerm::getNumberOfUsages($_GET["term_id"]).")",
698 $this->ctrl->getLinkTarget($this, "listUsages"));
699
700 $tabs_gui->addNonTabbedLink("presentation_view",
701 $this->lng->txt("glo_presentation_view"),
702 ILIAS_HTTP_PATH.
703 "/goto.php?target=".
704 "git".
705 "_".$_GET["term_id"]."_".$_GET["ref_id"]."&client_id=".CLIENT_ID,
706 "_top"
707 );
708
709 }
710
711 // back to glossary
712 $tabs_gui->setBackTarget($this->lng->txt("glossary"),
713 $this->ctrl->getLinkTargetByClass("ilobjglossarygui", "listTerms"));
714
715 }
716
722 public static function _goto($a_target, $a_ref_id = "")
723 {
724 global $rbacsystem, $ilErr, $lng, $ilAccess;
725
726 $glo_id = ilGlossaryTerm::_lookGlossaryID($a_target);//::_lookupContObjID($a_target);
727
728 // get all references
729 if ($a_ref_id > 0)
730 {
731 $ref_ids = array($a_ref_id);
732 }
733 else
734 {
735 $ref_ids = ilObject::_getAllReferences($glo_id);
736 }
737
738 // check read permissions
739 foreach ($ref_ids as $ref_id)
740 {
741 // Permission check
742 if ($ilAccess->checkAccess("read", "", $ref_id))
743 {
744 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
745 $_GET["term_id"] = $a_target;
746 $_GET["ref_id"] = $ref_id;
747 $_GET["cmd"] = "listDefinitions";
748 include_once("ilias.php");
749 exit;
750 }
751 }
752 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
753 {
754 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
755 ilObject::_lookupTitle($glo_id)), true);
757 }
758
759
760 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
761 }
762
766 function listUsages()
767 {
768 global $ilTabs, $tpl;
769
770 //$this->displayLocator();
771 $this->getTemplate();
772 $this->displayLocator();
773 $this->setTabs();
774 $ilTabs->activateTab("usage");
775
776 $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
777 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
778
779 include_once("./Modules/Glossary/classes/class.ilTermUsagesTableGUI.php");
780 $tab = new ilTermUsagesTableGUI($this, "listUsages", $_GET["term_id"]);
781
782 $tpl->setContent($tab->getHTML());
783
784 $this->quickList();
785 }
786
790 function quickList()
791 {
792 global $tpl, $ilCtrl;
793
794 //$tpl->setLeftNavUrl($ilCtrl->getLinkTarget($this, "showQuickList"));
795
796 include_once("./Modules/Glossary/classes/class.ilTermQuickListTableGUI.php");
797 $tab = new ilTermQuickListTableGUI($this, "editTerm");
798 $tpl->setLeftNavContent($tab->getHTML());
799 }
800}
801
802?>
$_GET["client_id"]
Glossary definition page GUI class.
Glossary definition page object.
Class ilGlossaryDefinition.
GUI class for glossary terms.
getOfflineDirectory()
get offline directory
getOverlayHTML($a_close_el_id, $a_glo_ov_id="", $a_lang="", $a_outputmode="offline")
Get overlay html.
cancel()
cancel adding definition
moveUp()
move definition upwards
quickList()
Set quick term list cmd into left navigation URL.
listDefinitions()
list definitions
getInternalLinks()
get internal links
static _goto($a_target, $a_ref_id="")
redirect script
executeCommand()
execute command
getTabs(&$tabs_gui)
get tabs
getEditTermForm()
Get edit term form.
moveDown()
move definition downwards
displayLocator()
display locator
confirmDefinitionDeletion()
deletion confirmation screen
saveDefinition()
save definition
setOfflineDirectory($offdir)
set offline directory to offdir
create()
form for new content object creation
output($a_offline=false, $a_tpl="", $a_outputmode="presentation")
output glossary term definitions
ilGlossaryTermGUI($a_id=0)
Constructor @access public.
Class ilGlossaryTerm.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
This class represents a property form user interface.
This class represents a selection list property in a property form.
Taxonomy node <-> item assignment.
Select taxonomy nodes input GUI.
special template class to simplify handling of ITX/PEAR
GUI class for glossary term definition editor.
TableGUI class for media object usages listing.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
includeMathjax($a_tpl=null)
Include Mathjax.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:54
redirection script todo: (a better solution should control the processing via a xml file)
$cmd
Definition: sahs_server.php:35
$ref_id
Definition: sahs_server.php:39