4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
24 $this->glossary = $a_parent_obj->object;
25 $this->
setId(
"glotl".$this->glossary->getId());
28 $this->
setTitle($lng->txt(
"cont_terms"));
31 $this->
addColumn($this->lng->txt(
"cont_term"));
32 $this->
addColumn($this->lng->txt(
"language"));
33 $this->
addColumn($this->lng->txt(
"cont_usage"));
34 $this->
addColumn($this->lng->txt(
"cont_definitions"));
38 $this->
setRowTemplate(
"tpl.term_tbl_row.html",
"Modules/Glossary");
42 $this->
addMultiCommand(
"addDefinition", $lng->txt(
"cont_add_definition"));
45 $this->
setData($this->glossary->getTermList($this->filter[
"term"],
"",
46 $this->filter[
"definition"]));
58 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
62 $ti->setSubmitFormOnEnter(
true);
64 $ti->readFromSession();
65 $this->filter[
"term"] = $ti->getValue();
68 if ($ilDB->getDBType() !=
"oracle")
70 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
71 $ti =
new ilTextInputGUI($lng->txt(
"cont_definition"),
"defintion");
74 $ti->setSubmitFormOnEnter(
true);
76 $ti->readFromSession();
77 $this->filter[
"definition"] = $ti->getValue();
89 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
"term_id", $term[
"id"]);
91 for($j=0; $j<count($defs); $j++)
98 $this->tpl->setCurrentBlock(
"move_up");
99 $this->tpl->setVariable(
"TXT_UP", $lng->txt(
"up"));
100 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
101 $ilCtrl->setParameter($this->parent_obj,
"def", $def[
"id"]);
102 $this->tpl->setVariable(
"LINK_UP",
103 $ilCtrl->getLinkTarget($this->parent_obj,
"moveDefinitionUp"));
104 $this->tpl->parseCurrentBlock();
108 if ($j+1 < count($defs))
110 $this->tpl->setCurrentBlock(
"move_down");
111 $this->tpl->setVariable(
"TXT_DOWN", $lng->txt(
"down"));
112 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
113 $ilCtrl->setParameter($this->parent_obj,
"def", $def[
"id"]);
114 $this->tpl->setVariable(
"LINK_DOWN",
115 $ilCtrl->getLinkTarget($this->parent_obj,
"moveDefinitionDown"));
116 $this->tpl->parseCurrentBlock();
120 $this->tpl->setCurrentBlock(
"delete");
121 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
122 $ilCtrl->setParameter($this->parent_obj,
"def", $def[
"id"]);
123 $this->tpl->setVariable(
"LINK_DELETE",
124 $ilCtrl->getLinkTarget($this->parent_obj,
"confirmDefinitionDeletion"));
125 $this->tpl->setVariable(
"TXT_DELETE", $lng->txt(
"delete"));
126 $this->tpl->parseCurrentBlock();
129 $this->tpl->setCurrentBlock(
"edit");
130 $ilCtrl->setParameterByClass(
"ilpageobjectgui",
"term_id", $term[
"id"]);
131 $ilCtrl->setParameterByClass(
"ilpageobjectgui",
"def", $def[
"id"]);
132 $this->tpl->setVariable(
"LINK_EDIT",
133 $ilCtrl->getLinkTargetByClass(array(
"ilglossarytermgui",
134 "iltermdefinitioneditorgui",
135 "ilpageobjectgui"),
"edit"));
136 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
137 $this->tpl->parseCurrentBlock();
140 $this->tpl->setCurrentBlock(
"definition");
141 $short_str = $def[
"short_text"];
145 $ltexs = strrpos($short_str,
"[tex]");
146 $ltexe = strrpos($short_str,
"[/tex]");
151 $short_str = $page->getFirstParagraphText();
152 $short_str = strip_tags($short_str,
"<br>");
153 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
158 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
159 $this->tpl->parseCurrentBlock();
161 $this->tpl->setCurrentBlock(
"definition_row");
162 $this->tpl->parseCurrentBlock();
165 $this->tpl->setCurrentBlock(
"check_col");
166 $this->tpl->setVariable(
"CHECKBOX_ID", $term[
"id"]);
167 $this->tpl->parseCurrentBlock();
170 $this->tpl->setCurrentBlock(
"edit_term");
171 $this->tpl->setVariable(
"TEXT_TERM", $term[
"term"]);
172 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
173 $this->tpl->setVariable(
"LINK_EDIT_TERM",
174 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"editTerm"));
175 $this->tpl->setVariable(
"TXT_EDIT_TERM", $lng->txt(
"edit"));
176 $this->tpl->parseCurrentBlock();
182 $this->tpl->setCurrentBlock(
"link_usage");
183 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
"term_id", $term[
"id"]);
185 $this->tpl->setVariable(
"LINK_USAGE",
186 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages"));
187 $ilCtrl->setParameterByClass(
"ilglossarytermgui",
"term_id",
"");
188 $this->tpl->parseCurrentBlock();
192 $this->tpl->setCurrentBlock(
"usage");
194 $this->tpl->parseCurrentBlock();
198 $this->tpl->setVariable(
"TEXT_LANGUAGE", $lng->txt(
"meta_l_".$term[
"language"]));