4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
   20        function __construct($a_parent_obj, $a_parent_cmd, $a_tax_node)
 
   24                $this->glossary = $a_parent_obj->object;
 
   25                $this->
setId(
"glotl".$this->glossary->getId());
 
   26                $this->tax_node = $a_tax_node;
 
   28                $this->selectable_cols = array();
 
   30                include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
 
   32                $this->adv_fields = $adv_ad->getAllFields();
 
   33                foreach ($this->adv_fields as $f)
 
   35                        $this->selectable_cols[
"md_".$f[
"id"]] = array(
 
   42                $this->selectable_cols[
"language"] = array(
 
   43                        "txt" => 
$lng->txt(
"language"),
 
   45                $this->selectable_cols[
"usage"] = array(
 
   46                        "txt" => 
$lng->txt(
"cont_usage"),
 
   51                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   52                $this->
setTitle($lng->txt(
"cont_terms"));
 
   57                include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
 
   59                $this->adv_cols_order = $adv_ap->getColumnOrder();
 
   61                foreach ($this->adv_cols_order as $c)
 
   65                                $this->
addColumn($lng->txt(
"cont_term"), 
"term");
 
   69                                if (in_array(
"md_".$c[
"id"], $this->selected_cols))
 
   71                                        $this->
addColumn($c[
"text"], 
"md_".$c[
"id"]);
 
   76                foreach (array (
"language", 
"usage") as $c)
 
   78                        if (in_array($c, $this->selected_cols))
 
   80                                $this->
addColumn($this->selectable_cols[$c][
"txt"]);
 
   86                $this->
addColumn($this->lng->txt(
"cont_definitions"));
 
   88                if (in_array($this->glossary->getVirtualMode(),
 
   89                        array(
"level", 
"subtree")))
 
   91                        $this->
addColumn($this->lng->txt(
"obj_glo"));
 
   98                $this->
setRowTemplate(
"tpl.term_tbl_row.html", 
"Modules/Glossary");
 
  107                $this->
setData($this->glossary->getTermList($this->filter[
"term"], 
"",
 
  108                        $this->filter[
"definition"], $this->tax_node, 
true, 
true));
 
  119                return $this->selectable_cols;
 
  129                if (substr($a_field, 0, 3) == 
"md_")
 
  131                        $md_id = (int) substr($a_field, 3);
 
  148                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  150                $ti->setMaxLength(64);
 
  152                $ti->setSubmitFormOnEnter(
true);
 
  154                $ti->readFromSession();
 
  155                $this->filter[
"term"] = $ti->getValue();
 
  158                if (
$ilDB->getDBType() != 
"oracle")
 
  160                        include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  162                        $ti->setMaxLength(64);
 
  164                        $ti->setSubmitFormOnEnter(
true);
 
  166                        $ti->readFromSession();
 
  167                        $this->filter[
"definition"] = $ti->getValue();
 
  178                include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
  181                $ilCtrl->setParameterByClass(
"ilobjglossarygui", 
"term_id", $term[
"id"]);
 
  182                $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", $term[
"id"]);
 
  183                $ilCtrl->setParameterByClass(
"ilglossarydefpagegui", 
"term_id", $term[
"id"]);
 
  186                if ($this->glossary->getId() == $term[
"glo_id"])
 
  189                        $list->addItem(
$lng->txt(
"cont_edit_term"), 
"", 
$ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"editTerm"));
 
  190                        if (count($defs) > 1)
 
  192                                $list->addItem(
$lng->txt(
"cont_edit_definitions"), 
"", 
$ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listDefinitions"));
 
  194                        else if (count($defs) == 1)
 
  196                                $ilCtrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", $defs[0][
"id"]);
 
  197                                $list->addItem(
$lng->txt(
"cont_edit_definition"), 
"", 
$ilCtrl->getLinkTargetByClass(array(
"ilglossarytermgui",
 
  198                                        "iltermdefinitioneditorgui",
 
  199                                        "ilglossarydefpagegui"), 
"edit"));
 
  201                        $list->addItem(
$lng->txt(
"cont_add_definition"), 
"", 
$ilCtrl->getLinkTargetByClass(
"ilobjglossarygui", 
"addDefinition"));
 
  202                        $ilCtrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", 
"");
 
  204                        $list->setId(
"act_term_".$term[
"id"]);
 
  205                        $list->setListTitle(
$lng->txt(
"actions"));
 
  206                        $this->tpl->setVariable(
"ACTIONS", $list->getHTML());
 
  210                for($j=0; $j<count($defs); $j++)
 
  262                        $this->tpl->setCurrentBlock(
"definition");
 
  263                        $short_str = $def[
"short_text"];
 
  267                        $ltexs = strrpos($short_str, 
"[tex]");
 
  268                        $ltexe = strrpos($short_str, 
"[/tex]");
 
  273                                $short_str = $page->getFirstParagraphText();
 
  274                                $short_str = strip_tags($short_str, 
"<br>");
 
  275                                $ltexe = strpos($short_str, 
"[/tex]", $ltexs);
 
  280                        $this->tpl->setVariable(
"DEF_SHORT", $short_str);
 
  281                        $this->tpl->parseCurrentBlock();
 
  283                        $this->tpl->setCurrentBlock(
"definition_row");
 
  284                        $this->tpl->parseCurrentBlock();
 
  287                $this->tpl->setCurrentBlock(
"check_col");
 
  288                $this->tpl->setVariable(
"CHECKBOX_ID", $term[
"id"]);
 
  289                $this->tpl->parseCurrentBlock();
 
  291                $ilCtrl->setParameter($this->parent_obj, 
"term_id", $term[
"id"]);
 
  298                        if ($nr_usage > 0 && $this->glossary->getId() == $term[
"glo_id"])
 
  300                                $this->tpl->setCurrentBlock(
"link_usage");
 
  301                                $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", $term[
"id"]);
 
  303                                $this->tpl->setVariable(
"LINK_USAGE",
 
  304                                        $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listUsages"));
 
  305                                $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", 
"");
 
  306                                $this->tpl->parseCurrentBlock();
 
  310                                $this->tpl->setCurrentBlock(
"usage");
 
  312                                $this->tpl->parseCurrentBlock();
 
  314                        $this->tpl->setCurrentBlock(
"td_usage");
 
  315                        $this->tpl->parseCurrentBlock();
 
  319                if (in_array($this->glossary->getVirtualMode(),
 
  320                        array(
"level", 
"subtree")))
 
  322                        $this->tpl->setCurrentBlock(
"glossary");
 
  324                        $this->tpl->parseCurrentBlock();
 
  330                        $this->tpl->setCurrentBlock(
"td_lang");
 
  331                        $this->tpl->setVariable(
"TEXT_LANGUAGE", 
$lng->txt(
"meta_l_".$term[
"language"]));
 
  332                        $this->tpl->parseCurrentBlock();
 
  336                foreach ($this->adv_cols_order as $c)
 
  340                                $this->tpl->setCurrentBlock(
"td");
 
  341                                $this->tpl->setVariable(
"TD_VAL", $term[
"term"]);
 
  342                                $this->tpl->parseCurrentBlock();
 
  346                                if (in_array(
"md_".$c[
"id"], $this->selected_cols))
 
  348                                        $id = (int) $c[
"id"];
 
  351                                        if(isset($term[
"md_".$id.
"_presentation"]))
 
  353                                                $pb = $term[
"md_".$id.
"_presentation"]->getHTML();
 
  360                                        $this->tpl->setCurrentBlock(
"td");                                                                              
 
  361                                        $this->tpl->setVariable(
"TD_VAL", $val);
 
  362                                        $this->tpl->parseCurrentBlock();
 
User interface class for advanced drop-down selection lists.
Glossary definition page object.
getDefinitionList($a_term_id)
static
static getNumberOfUsages($a_term_id)
Get number of usages.
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.
getSelectedColumns()
Get selected columns.
setEnableHeader($a_enableheader)
Set Enable Header.
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
fillRow($term)
Fill table row.
__construct($a_parent_obj, $a_parent_cmd, $a_tax_node)
Constructor.
getSelectableColumns()
Get selectable columns.
numericOrdering($a_field)
Should this field be sorted numeric?
This class represents a text property in a property form.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static insertLatexImages($a_text, $a_start="\[tex\]", $a_end="\[\/tex\]")
replace [text]...[/tex] tags with formula image code