4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
31 function __construct($a_parent_obj, $a_parent_cmd, $a_glossary, $a_offline,
32 $a_tax_node, $a_tax_id = 0)
36 $this->glossary = $a_glossary;
37 $this->offline = $a_offline;
38 $this->tax_node = $a_tax_node;
39 $this->tax_id = $a_tax_id;
40 $this->
setId(
"glopr".$this->glossary->getId());
42 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
47 parent::__construct($a_parent_obj, $a_parent_cmd);
50 if ($this->glossary->getPresentationMode() ==
"full_def")
52 $this->
addColumn($lng->txt(
"cont_terms"));
56 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
59 foreach ($this->adv_cols_order as $c)
63 $this->
addColumn($lng->txt(
"cont_term"),
"term");
67 $this->
addColumn($c[
"text"],
"md_".$c[
"id"]);
72 $this->
addColumn($lng->txt(
"cont_definitions"));
73 if ($this->glossary->isVirtual())
82 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj));
88 $this->
setRowTemplate(
"tpl.term_tbl_pres_row.html",
"Modules/Glossary");
100 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
103 $this->record_gui->parse();
106 $this->
setData($this->glossary->getTermList($this->filter[
"term"],
$_GET[
"letter"],
107 $this->filter[
"definition"], $this->tax_node,
false,
true, $this->record_gui->getFilterElements(),
false,
true));
118 return $this->record_gui;
129 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
133 $ti->setSubmitFormOnEnter(
true);
135 $ti->readFromSession();
136 $this->filter[
"term"] = $ti->getValue();
139 if ($ilDB->getDBType() !=
"oracle")
141 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
142 $ti =
new ilTextInputGUI($lng->txt(
"cont_definition"),
"defintion");
145 $ti->setSubmitFormOnEnter(
true);
147 $ti->readFromSession();
148 $this->filter[
"definition"] = $ti->getValue();
159 if (substr($a_field, 0, 3) ==
"md_")
161 $md_id = (int) substr($a_field, 3);
178 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
180 if ($this->glossary->getPresentationMode() ==
"full_def")
182 $this->tpl->setCurrentBlock(
"fd_td");
183 $this->tpl->setVariable(
"FULL_DEF",
184 $this->parent_obj->listDefinitions(
$_GET[
"ref_id"], $term[
"id"],
true));
185 $this->tpl->parseCurrentBlock();
191 for ($j=0; $j < count($defs); $j++)
194 if (count($defs) > 1)
198 if (!empty ($filter))
200 $ilCtrl->setParameter($this->parent_obj,
"term", $filter);
201 $ilCtrl->setParameter($this->parent_obj,
"oldoffset",
$_GET[
"oldoffset"]);
203 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
204 $ilCtrl->setParameter($this->parent_obj,
"offset",
$_GET[
"offset"]);
205 $def_href = $ilCtrl->getLinkTarget($this->parent_obj,
"listDefinitions");
206 $ilCtrl->clearParameters($this->parent_obj);
210 $def_href =
"term_".$term[
"id"].
".html";
212 $this->tpl->parseCurrentBlock();
214 $this->tpl->setCurrentBlock(
"definition");
215 $this->tpl->setVariable(
"DEF_TEXT", $lng->txt(
"cont_definition").
" ".($j + 1));
216 $this->tpl->setVariable(
"HREF_DEF", $def_href.
"#ilPageTocDef".($j + 1));
217 $this->tpl->parseCurrentBlock();
221 $this->tpl->setCurrentBlock(
"definition");
222 if ($def[
"short_text_dirty"])
226 $def_obj->updateShortText();
227 $short_str = $def_obj->getShortText();
231 $short_str = $def[
"short_text"];
235 $ltexs = strrpos($short_str,
"[tex]");
236 $ltexe = strrpos($short_str,
"[/tex]");
241 $short_str = $page->getFirstParagraphText();
242 $short_str = strip_tags($short_str,
"<br>");
243 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
247 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
255 $this->parent_obj->getOfflineDirectory().
'/teximg',
'./teximg');
260 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
261 $this->tpl->parseCurrentBlock();
263 $this->tpl->setCurrentBlock(
"definition_row");
264 $this->tpl->parseCurrentBlock();
269 $this->tpl->touchBlock(
"def_td");
273 if ($this->glossary->isVirtual())
275 $this->tpl->setCurrentBlock(
"glossary_row");
277 $this->tpl->setVariable(
"GLO_TITLE", $glo_title);
278 $this->tpl->parseCurrentBlock();
283 $ilCtrl->clearParameters($this->parent_obj);
286 foreach ($this->adv_cols_order as $c)
290 $this->tpl->setCurrentBlock(
"link_start");
293 if (!empty ($filter))
295 $ilCtrl->setParameter($this->parent_obj,
"term", $filter);
296 $ilCtrl->setParameter($this->parent_obj,
"oldoffset",
$_GET[
"oldoffset"]);
298 $ilCtrl->setParameter($this->parent_obj,
"term_id", $term[
"id"]);
299 $ilCtrl->setParameter($this->parent_obj,
"offset",
$_GET[
"offset"]);
300 $this->tpl->setVariable(
"LINK_VIEW_TERM",
301 $ilCtrl->getLinkTarget($this->parent_obj,
"listDefinitions"));
302 $ilCtrl->clearParameters($this->parent_obj);
306 $this->tpl->setVariable(
"LINK_VIEW_TERM",
"term_".$term[
"id"].
".html");
308 $this->tpl->parseCurrentBlock();
310 $this->tpl->setCurrentBlock(
"link_end");
311 $this->tpl->setVariable(
"ANCHOR_TERM",
"term_".$term[
"id"]);
312 $this->tpl->parseCurrentBlock();
314 $this->tpl->setCurrentBlock(
"td");
315 $this->tpl->setVariable(
"TEXT", $term[
"term"]);
316 $this->tpl->parseCurrentBlock();
323 if(isset($term[
"md_".$id.
"_presentation"]))
325 $pb = $term[
"md_".$id.
"_presentation"]->getList();
332 $this->tpl->setCurrentBlock(
"td");
333 $this->tpl->setVariable(
"TEXT", $val);
334 $this->tpl->parseCurrentBlock();
__construct($a_parent_obj, $a_parent_cmd, $a_glossary, $a_offline, $a_tax_node, $a_tax_id=0)
Constructor.
setTableGUI($a_val)
Set table.
static getDefinitionList($a_term_id)
static
fillRow($term)
Fill table row.
Term list table for presentation mode.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
static _lookupTitle($a_id)
lookup object title
static xml2output($a_text, $a_wysiwyg=false, $a_replace_lists=true)
Converts xml from DB to output in edit textarea.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
Glossary definition page object.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
Class ilGlossaryDefinition.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
numericOrdering($a_field)
Should this field be sorted numeric?
static getInstance()
Singleton: get instance.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
getAdvMDRecordGUI()
needed for advmd filter handling
setEnableTitle($a_enabletitle)
Set Enable Title.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setFilterCommand($a_val, $a_caption=null)
Set filter command.