ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTermQuickListTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 
15 {
16 
20  function __construct($a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  $this->glossary = $a_parent_obj->glossary;
25  $this->setId("gloqtl".$this->glossary->getId());
26 
27  parent::__construct($a_parent_obj, $a_parent_cmd);
28  $this->setTitle($lng->txt("cont_terms"));
29 
30  $this->addColumn("", "");
31  $this->setEnableHeader(false);
32  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
33  $this->setRowTemplate("tpl.term_quick_list_row.html", "Modules/Glossary");
34  $this->setEnableTitle(false);
35 
36  //$this->setData($this->glossary->getTermList($this->filter["term"], "",
37  // $this->filter["definition"]));
38  $this->setData($this->glossary->getTermList("", "", ""));
39  }
40 
44  protected function fillRow($term)
45  {
46  global $lng, $ilCtrl;
47 
48  $defs = ilGlossaryDefinition::getDefinitionList($term["id"]);
49  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $term["id"]);
50 
51  $sep = ": ";
52  for($j=0; $j < count($defs); $j++)
53  {
54  $def = $defs[$j];
55 
56  $this->tpl->setCurrentBlock("definition");
57  $this->tpl->setVariable("SEP", $sep);
58  $ilCtrl->setParameterByClass("ilpageobjectgui", "def", $def["id"]);
59  $this->tpl->setVariable("LINK_EDIT_DEF",
60  $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui",
61  "iltermdefinitioneditorgui",
62  "ilpageobjectgui"), "edit"));
63  $this->tpl->setVariable("TEXT_DEF", $this->lng->txt("glo_definition_abbr").($j+1));
64  $this->tpl->parseCurrentBlock();
65  $sep = ", ";
66  }
67  $ilCtrl->setParameterByClass("ilpageobjectgui", "def", $_GET["def"]);
68 
69  if ($term["id"] == $_GET["term_id"])
70  {
71  $this->tpl->touchBlock("hl");
72  }
73 
74  $this->tpl->setVariable("TEXT_TERM", $term["term"]);
75  $this->tpl->setVariable("LINK_EDIT_TERM",
76  $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "editTerm"));
77 
78  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $_GET["term_id"]);
79  }
80 
81 }
82 ?>