ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
5 require_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
6 
18 {
19  var $ilias;
20  var $lng;
21  var $tpl;
22  var $glossary;
23  var $term;
24  var $link_xml;
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  break;
63 
64  default:
65  $ret =& $this->$cmd();
66  break;
67  }
68  }
69 
75  function setOfflineDirectory ($offdir) {
76  $this->offline_directory = $offdir;
77  }
78 
79 
84  function getOfflineDirectory () {
85  return $this->offline_directory;
86  }
87 
88 
89  function setGlossary(&$a_glossary)
90  {
91  $this->glossary =& $a_glossary;
92  }
93 
94  function setLinkXML($a_link_xml)
95  {
96  $this->link_xml = $a_link_xml;
97  }
98 
99  function getLinkXML()
100  {
101  return $this->link_xml;
102  }
103 
107  function create()
108  {
109  global $ilUser;
110 
111  $this->getTemplate();
112  $this->displayLocator();
113  $this->tpl->setTitle($this->lng->txt("cont_new_term"));
114  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.gif"));
115  $this->setTabs();
116 
117  // load template for table
118  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.glossary_term_new.html", true);
119  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
120  $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_new_term"));
121  $this->tpl->setVariable("TXT_TERM", $this->lng->txt("cont_term"));
122  $this->tpl->setVariable("INPUT_TERM", "term");
123  $this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("language"));
125 
126  if ($_SESSION["il_text_lang_".$_GET["ref_id"]] != "")
127  {
128  $s_lang = $_SESSION["il_text_lang_".$_GET["ref_id"]];
129  }
130  else
131  {
132  $s_lang = $ilUser->getLanguage();
133  }
134 
135  $select_language = ilUtil::formSelect ($s_lang, "term_language",$lang,false,true);
136  $this->tpl->setVariable("SELECT_LANGUAGE", $select_language);
137  $this->tpl->setVariable("BTN_NAME", "saveTerm");
138  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
139  }
140 
144  function saveTerm()
145  {
146  $term =& new ilGlossaryTerm();
147  $term->setGlossary($this->glossary);
148  $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
149  $term->setLanguage($_POST["term_language"]);
150  $_SESSION["il_text_lang_".$_GET["ref_id"]] = $_POST["term_language"];
151  $term->create();
152 
153  ilUtil::sendSuccess($this->lng->txt("cont_added_term"),true);
154  $this->ctrl->returnToParent($this);
155  }
156 
157 
161  function editTerm()
162  {
163  global $ilTabs;
164 
165  //$this->displayLocator();
166  $this->getTemplate();
167  $this->displayLocator();
168  $this->setTabs();
169  $ilTabs->activateTab("properties");
170 
171  //$this->displayLocator();
172  $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
173  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.gif"));
174 
175  // load template for table
176  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.glossary_term_edit.html", true);
177  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "updateTerm"));
178  $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_edit_term"));
179  $this->tpl->setVariable("TXT_TERM", $this->lng->txt("cont_term"));
180  $this->tpl->setVariable("INPUT_TERM", "term");
181  $this->tpl->setVariable("VALUE_TERM", htmlspecialchars($this->term->getTerm()));
182  $this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("language"));
184  $select_language = ilUtil::formSelect ($this->term->getLanguage(),"term_language",$lang,false,true);
185  $this->tpl->setVariable("SELECT_LANGUAGE", $select_language);
186  $this->tpl->setVariable("BTN_NAME", "updateTerm");
187  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
188  }
189 
190 
194  function updateTerm()
195  {
196  $this->term->setTerm(ilUtil::stripSlashes($_POST["term"]));
197  $this->term->setLanguage($_POST["term_language"]);
198  $this->term->update();
199  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
200  $this->ctrl->redirect($this, "editTerm");
201  }
202 
209  function getOverlayHTML($a_close_el_id, $a_glo_ov_id = "", $a_lang = "", $a_outputmode = "offline")
210  {
211  global $lng;
212 
213  if ($a_lang == "")
214  {
215  $a_lang = $lng->getLangKey();
216  }
217 
218  $tpl = new ilTemplate("tpl.glossary_overlay.html", true, true, "Modules/Glossary");
219 // $this->output(true, $tpl);
220  if ($a_outputmode == "preview")
221  {
222  $a_outputmode = "presentation";
223  }
224  if ($a_outputmode == "offline")
225  {
226  $this->output(true, $tpl, $a_outputmode);
227  }
228  else
229  {
230  $this->output(false, $tpl, $a_outputmode);
231  }
232  if ($a_glo_ov_id != "")
233  {
234  $tpl->setCurrentBlock("glovlink");
235  $tpl->setVariable("TXT_LINK", $lng->txtlng("content", "cont_sco_glossary", $a_lang));
236  $tpl->setVariable("ID_LINK", $a_glo_ov_id);
237  $tpl->parseCurrentBlock();
238  }
239  $tpl->setVariable("TXT_CLOSE", $lng->txtlng("common", "close", $a_lang));
240  $tpl->setVariable("ID_CLOSE", $a_close_el_id);
241  return $tpl->get();
242  }
243 
249  function output($a_offline = false, $a_tpl = "", $a_outputmode = "presentation")
250  {
251  if ($a_tpl != "")
252  {
253  $tpl = $a_tpl;
254  }
255  else
256  {
257  $tpl = $this->tpl;
258  }
259 
260  require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
261  require_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
262 
263  $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
264 
265  $tpl->setVariable("TXT_TERM", $this->term->getTerm());
266 
267  for($j=0; $j<count($defs); $j++)
268  {
269  $def = $defs[$j];
270  $page_gui = new ilPageObjectGUI("gdf", $def["id"]);
271  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
272  if (!$a_offline)
273  {
274  //$page_gui->setFullscreenLink(
275  // "ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=".$_GET["ref_id"]);
276  }
277  else
278  {
279  $page_gui->setFullscreenLink("fullscreen.html"); // id is set by xslt
280  }
281  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=downloadFile&amp;ref_id=".$_GET["ref_id"]);
282 
283  if (!$a_offline)
284  {
285  $page_gui->setOutputMode($a_outputmode);
286  }
287  else
288  {
289  $page_gui->setOutputMode("offline");
290  $page_gui->setOfflineDirectory($this->getOfflineDirectory());
291  }
292 
293  //$page_gui->setOutputMode("edit");
294  //$page_gui->setPresentationTitle($this->term->getTerm());
295  $page_gui->setLinkXML($this->getLinkXML());
296  $page_gui->setTemplateOutput(false);
297  $output = $page_gui->presentation($page_gui->getOutputMode());
298 
299  if (count($defs) > 1)
300  {
301  $tpl->setCurrentBlock("definition_header");
302  $tpl->setVariable("TXT_DEFINITION",
303  $this->lng->txt("cont_definition")." ".($j+1));
304  $tpl->parseCurrentBlock();
305  }
306 
307  $tpl->setCurrentBlock("definition");
308  $tpl->setVariable("PAGE_CONTENT", $output);
309  $tpl->parseCurrentBlock();
310  }
311  }
312 
316  function getInternalLinks()
317  {
318  require_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
319  require_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
320 
321  $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId());
322 
323  $term_links = array();
324  for($j=0; $j<count($defs); $j++)
325  {
326  $def = $defs[$j];
327  $page = new ilPageObject("gdf", $def["id"]);
328  $page->buildDom();
329  $page_links = $page->getInternalLinks();
330  foreach($page_links as $key => $page_link)
331  {
332  $term_links[$key] = $page_link;
333  }
334  }
335 
336  return $term_links;
337  }
338 
342  function listDefinitions()
343  {
344  global $ilTabs;
345 
346  $this->getTemplate();
347  $this->displayLocator();
348  $this->setTabs();
349  $ilTabs->activateTab("definitions");
350 
351  require_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
352 
353  // content style
354  $this->tpl->setCurrentBlock("ContentStyle");
355  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
357  $this->tpl->parseCurrentBlock();
358 
359  // syntax style
360  $this->tpl->setCurrentBlock("SyntaxStyle");
361  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
363  $this->tpl->parseCurrentBlock();
364 
365  // load template for table
366  $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
367  //$this->tpl->addBlockfile("CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
368  //ilUtil::sendInfo();
369  $this->tpl->addBlockfile("STATUSLINE", "statusline", "tpl.statusline.html");
370  $this->tpl->setTitle(
371  $this->lng->txt("cont_term").": ".$this->term->getTerm());
372  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.gif"));
373 
374  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
375 
376  $this->tpl->setCurrentBlock("add_def");
377  $this->tpl->setVariable("TXT_ADD_DEFINITION",
378  $this->lng->txt("cont_add_definition"));
379  $this->tpl->setVariable("BTN_ADD", "addDefinition");
380  $this->tpl->parseCurrentBlock();
381  $this->tpl->setCurrentBlock("def_list");
382 
384 
385  $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
386 
387  for($j=0; $j<count($defs); $j++)
388  {
389  $def = $defs[$j];
390  $page_gui = new ilPageObjectGUI("gdf", $def["id"]);
391  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
392  $page_gui->setTemplateOutput(false);
393  $output = $page_gui->preview();
394 
395  if (count($defs) > 1)
396  {
397  $this->tpl->setCurrentBlock("definition_header");
398  $this->tpl->setVariable("TXT_DEFINITION",
399  $this->lng->txt("cont_definition")." ".($j+1));
400  $this->tpl->parseCurrentBlock();
401  }
402 
403  if ($j > 0)
404  {
405  $this->tpl->setCurrentBlock("up");
406  $this->tpl->setVariable("TXT_UP", $this->lng->txt("up"));
407  $this->ctrl->setParameter($this, "def", $def["id"]);
408  $this->tpl->setVariable("LINK_UP",
409  $this->ctrl->getLinkTarget($this, "moveUp"));
410  $this->tpl->parseCurrentBlock();
411  }
412 
413  if ($j+1 < count($defs))
414  {
415  $this->tpl->setCurrentBlock("down");
416  $this->tpl->setVariable("TXT_DOWN", $this->lng->txt("down"));
417  $this->ctrl->setParameter($this, "def", $def["id"]);
418  $this->tpl->setVariable("LINK_DOWN",
419  $this->ctrl->getLinkTarget($this, "moveDown"));
420  $this->tpl->parseCurrentBlock();
421  }
422  $this->tpl->setCurrentBlock("submit_btns");
423  $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
424  $this->ctrl->setParameter($this, "def", $def["id"]);
425  $this->ctrl->setParameterByClass("ilTermDefinitionEditorGUI", "def", $def["id"]);
426  $this->tpl->setVariable("LINK_EDIT",
427  $this->ctrl->getLinkTargetByClass(array("ilTermDefinitionEditorGUI", "ilPageObjectGUI"), "edit"));
428  $this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
429  $this->tpl->setVariable("LINK_DELETE",
430  $this->ctrl->getLinkTarget($this, "confirmDefinitionDeletion"));
431  $this->tpl->parseCurrentBlock();
432 
433  $this->tpl->setCurrentBlock("definition");
434  $this->tpl->setVariable("PAGE_CONTENT", $output);
435  $this->tpl->parseCurrentBlock();
436  }
437  //$this->tpl->setCurrentBlock("def_list");
438  //$this->tpl->parseCurrentBlock();
439 
440  }
441 
442 
447  {
448  $this->getTemplate();
449  $this->displayLocator();
450  $this->setTabs();
451 
452  // content style
453  $this->tpl->setCurrentBlock("ContentStyle");
454  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
456  $this->tpl->parseCurrentBlock();
457 
458  // syntax style
459  $this->tpl->setCurrentBlock("SyntaxStyle");
460  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
462  $this->tpl->parseCurrentBlock();
463 
464  $this->tpl->setTitle(
465  $this->lng->txt("cont_term").": ".$this->term->getTerm());
466  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.gif"));
467 
468  $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_delete.html", true);
469  ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
470 
471  $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
472 
473  $definition =& new ilGlossaryDefinition($_GET["def"]);
474  //$page =& new ilPageObject("gdf", $definition->getId());
475  $page_gui =& new ilPageObjectGUI("gdf", $definition->getId());
476  $page_gui->setTemplateOutput(false);
477  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
478  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
479  $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
480  $output = $page_gui->preview();
481 
482  $this->tpl->setCurrentBlock("definition");
483  $this->tpl->setVariable("PAGE_CONTENT", $output);
484  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
485  $this->tpl->setVariable("LINK_CANCEL",
486  $this->ctrl->getLinkTarget($this, "cancelDefinitionDeletion"));
487  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("confirm"));
488  $this->ctrl->setParameter($this, "def", $definition->getId());
489  $this->tpl->setVariable("LINK_CONFIRM",
490  $this->ctrl->getLinkTarget($this, "deleteDefinition"));
491  $this->tpl->parseCurrentBlock();
492  }
493 
495  {
496  $this->ctrl->redirect($this, "listDefinitions");
497  }
498 
499 
500  function deleteDefinition()
501  {
502  $definition =& new ilGlossaryDefinition($_GET["def"]);
503  $definition->delete();
504  $this->ctrl->redirect($this, "listDefinitions");
505  }
506 
507 
511  function moveUp()
512  {
513  $definition =& new ilGlossaryDefinition($_GET["def"]);
514  $definition->moveUp();
515  $this->ctrl->redirect($this, "listDefinitions");
516  }
517 
518 
522  function moveDown()
523  {
524  $definition =& new ilGlossaryDefinition($_GET["def"]);
525  $definition->moveDown();
526  $this->ctrl->redirect($this, "listDefinitions");
527  }
528 
529 
533  function addDefinition()
534  {
535 
536  $this->getTemplate();
537  $this->displayLocator();
538  $this->setTabs();
539  $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
540  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.gif"));
541 
542  $term_id = $_GET["term_id"];
543 
544  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.obj_edit.html");
545  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "saveDefinition"));
546  $this->tpl->setVariable("TXT_HEADER", $this->lng->txt("gdf_new"));
547  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
548  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("gdf_add"));
549  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("title"));
550  $this->tpl->setVariable("TXT_DESC", $this->lng->txt("description"));
551  $this->tpl->setVariable("CMD_SUBMIT", "saveDefinition");
552  //$this->tpl->setVariable("TARGET", $this->getTargetFrame("save"));
553  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
554  $this->tpl->parseCurrentBlock();
555 
556  }
557 
561  function cancel()
562  {
563  $this->ctrl->redirect($this, "listDefinitions");
564  }
565 
569  function saveDefinition()
570  {
571  $def =& new ilGlossaryDefinition();
572  $def->setTermId($_GET["term_id"]);
573  $def->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));#"content object ".$newObj->getId()); // set by meta_gui->save
574  $def->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"])); // set by meta_gui->save
575  $def->create();
576 
577  $this->ctrl->redirect($this, "listDefinitions");
578  }
579 
580 
584  function getTemplate()
585  {
586  $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
587  $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
588  }
589 
593  function setTabs()
594  {
595  global $ilTabs;
596 
597  // catch feedback message
598  #include_once("classes/class.ilTabsGUI.php");
599  #$tabs_gui =& new ilTabsGUI();
600  $this->getTabs($ilTabs);
601 
602  #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
603 
604  }
605 
609  function displayLocator()
610  {
611  require_once ("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
612  $gloss_loc =& new ilGlossaryLocatorGUI();
613  $gloss_loc->setTerm($this->term);
614  $gloss_loc->setGlossary($this->glossary);
615  //$gloss_loc->setDefinition($this->definition);
616  $gloss_loc->display();
617  }
618 
619 
623  function getTabs(&$tabs_gui)
624  {
625  global $lng;
626 
627 //echo ":".$_GET["term_id"].":";
628  if ($_GET["term_id"] != "")
629  {
630  $tabs_gui->addTab("properties",
631  $lng->txt("properties"),
632  $this->ctrl->getLinkTarget($this, "editTerm"));
633 
634  $tabs_gui->addTab("definitions",
635  $lng->txt("cont_definitions"),
636  $this->ctrl->getLinkTarget($this, "listDefinitions"));
637 
638  $tabs_gui->addTab("usage",
639  $lng->txt("cont_usage")." (".ilGlossaryTerm::getNumberOfUsages($_GET["term_id"]).")",
640  $this->ctrl->getLinkTarget($this, "listUsages"));
641  }
642 
643  // back to glossary
644  $tabs_gui->setBackTarget($this->lng->txt("glossary"),
645  $this->ctrl->getLinkTargetByClass("ilobjglossarygui", "listTerms"));
646 
647  }
648 
654  function _goto($a_target, $a_ref_id = "")
655  {
656  global $rbacsystem, $ilErr, $lng, $ilAccess;
657 
658  $glo_id = ilGlossaryTerm::_lookGlossaryID($a_target);//::_lookupContObjID($a_target);
659 
660  // get all references
661  if ($a_ref_id > 0)
662  {
663  $ref_ids = array($a_ref_id);
664  }
665  else
666  {
667  $ref_ids = ilObject::_getAllReferences($glo_id);
668  }
669 
670  // check read permissions
671  foreach ($ref_ids as $ref_id)
672  {
673  // Permission check
674  if ($ilAccess->checkAccess("read", "", $ref_id))
675  {
676  $_GET["baseClass"] = "ilGlossaryPresentationGUI";
677  $_GET["term_id"] = $a_target;
678  $_GET["ref_id"] = $ref_id;
679  $_GET["cmd"] = "listDefinitions";
680  include_once("ilias.php");
681  exit;
682  }
683  }
684  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
685  {
686  $_GET["cmd"] = "frameset";
687  $_GET["target"] = "";
688  $_GET["ref_id"] = ROOT_FOLDER_ID;
689  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
690  ilObject::_lookupTitle($glo_id)), true);
691  include("repository.php");
692  exit;
693  }
694 
695 
696  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
697  }
698 
702  function listUsages()
703  {
704  global $ilTabs, $tpl;
705 
706  //$this->displayLocator();
707  $this->getTemplate();
708  $this->displayLocator();
709  $this->setTabs();
710  $ilTabs->activateTab("usage");
711  $this->tpl->setTitle($this->lng->txt("cont_term").": ".$this->term->getTerm());
712  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.gif"));
713 
714  include_once("./Modules/Glossary/classes/class.ilTermUsagesTableGUI.php");
715  $tab = new ilTermUsagesTableGUI($this, "listUsages", $_GET["term_id"]);
716 
717  $tpl->setContent($tab->getHTML());
718  }
719 }
720 
721 ?>