4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
   29        function __construct($a_parent_obj, $a_parent_cmd, $a_tax_node)
 
   33                $this->glossary = $a_parent_obj->object;
 
   34                $this->
setId(
"glotl".$this->glossary->getId());
 
   35                $this->tax_node = $a_tax_node;
 
   37                $this->selectable_cols = array();
 
   39                include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermPermission.php");
 
   42                include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
 
   44                $this->adv_fields = $adv_ad->getAllFields();
 
   45                foreach ($this->adv_fields as $f)
 
   47                        $this->selectable_cols[
"md_".$f[
"id"]] = array(
 
   54                $this->selectable_cols[
"language"] = array(
 
   55                        "txt" => 
$lng->txt(
"language"),
 
   57                $this->selectable_cols[
"usage"] = array(
 
   58                        "txt" => 
$lng->txt(
"cont_usage"),
 
   63                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   64                $this->
setTitle($lng->txt(
"cont_terms"));
 
   69                include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
 
   71                $this->adv_cols_order = $adv_ap->getColumnOrder();
 
   73                foreach ($this->adv_cols_order as $c)
 
   77                                $this->
addColumn($lng->txt(
"cont_term"), 
"term");
 
   81                                if (in_array(
"md_".$c[
"id"], $this->selected_cols))
 
   83                                        $this->
addColumn($c[
"text"], 
"md_".$c[
"id"]);
 
   88                foreach (array (
"language", 
"usage") as $c)
 
   90                        if (in_array($c, $this->selected_cols))
 
   92                                $this->
addColumn($this->selectable_cols[$c][
"txt"]);
 
   98                $this->
addColumn($this->lng->txt(
"cont_definitions"));
 
  102                        $this->
addColumn($this->lng->txt(
"obj_glo"));
 
  109                $this->
setRowTemplate(
"tpl.term_tbl_row.html", 
"Modules/Glossary");
 
  120                $this->
setData($this->glossary->getTermList($this->filter[
"term"], 
"",
 
  121                        $this->filter[
"definition"], $this->tax_node, 
true, 
true, 
null, 
false, 
true));
 
  132                include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
 
  133                return (in_array($this->glossary->getVirtualMode(),
 
  146                return $this->selectable_cols;
 
  156                if (substr($a_field, 0, 3) == 
"md_")
 
  158                        $md_id = (int) substr($a_field, 3);
 
  175                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  177                $ti->setMaxLength(64);
 
  179                $ti->setSubmitFormOnEnter(
true);
 
  181                $ti->readFromSession();
 
  182                $this->filter[
"term"] = $ti->getValue();
 
  185                if (
$ilDB->getDBType() != 
"oracle")
 
  187                        include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  189                        $ti->setMaxLength(64);
 
  191                        $ti->setSubmitFormOnEnter(
true);
 
  193                        $ti->readFromSession();
 
  194                        $this->filter[
"definition"] = $ti->getValue();
 
  205                include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
  208                $ilCtrl->setParameterByClass(
"ilobjglossarygui", 
"term_id", $term[
"id"]);
 
  209                $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", $term[
"id"]);
 
  210                $ilCtrl->setParameterByClass(
"ilglossarydefpagegui", 
"term_id", $term[
"id"]);
 
  215                if ($this->term_perm->checkPermission(
"write", $term[
"id"]) ||
 
  216                        $this->term_perm->checkPermission(
"edit_content", $term[
"id"]))
 
  218                        include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
  219                        include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermReferences.php");
 
  224                                $list->addItem(
$lng->txt(
"cont_edit_term"), 
"", 
$ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"editTerm"));
 
  225                                if (count($defs) > 1)
 
  227                                        $list->addItem(
$lng->txt(
"cont_edit_definitions"), 
"", 
$ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listDefinitions"));
 
  228                                } 
else if (count($defs) == 1)
 
  230                                        $ilCtrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", $defs[0][
"id"]);
 
  231                                        $list->addItem(
$lng->txt(
"cont_edit_definition"), 
"", 
$ilCtrl->getLinkTargetByClass(array(
"ilglossarytermgui",
 
  232                                                "iltermdefinitioneditorgui",
 
  233                                                "ilglossarydefpagegui"), 
"edit"));
 
  235                                $list->addItem(
$lng->txt(
"cont_add_definition"), 
"", 
$ilCtrl->getLinkTargetByClass(
"ilobjglossarygui", 
"addDefinition"));
 
  236                                $ilCtrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", 
"");
 
  238                                $list->setId(
"act_term_" . $term[
"id"]);
 
  239                                $list->setListTitle(
$lng->txt(
"actions"));
 
  240                                $this->tpl->setVariable(
"ACTIONS", $list->getHTML());
 
  245                for($j=0; $j<count($defs); $j++)
 
  250                        $this->tpl->setCurrentBlock(
"definition");
 
  251                        $short_str = $def[
"short_text"];
 
  255                        $ltexs = strrpos($short_str, 
"[tex]");
 
  256                        $ltexe = strrpos($short_str, 
"[/tex]");
 
  261                                $short_str = $page->getFirstParagraphText();
 
  262                                $short_str = strip_tags($short_str, 
"<br>");
 
  263                                $ltexe = strpos($short_str, 
"[/tex]", $ltexs);
 
  267                        include_once 
'./Services/MathJax/classes/class.ilMathJax.php';
 
  271                        $this->tpl->setVariable(
"DEF_SHORT", $short_str);
 
  272                        $this->tpl->parseCurrentBlock();
 
  274                        $this->tpl->setCurrentBlock(
"definition_row");
 
  275                        $this->tpl->parseCurrentBlock();
 
  278                $this->tpl->setCurrentBlock(
"check_col");
 
  279                $this->tpl->setVariable(
"CHECKBOX_ID", $term[
"id"]);
 
  280                $this->tpl->parseCurrentBlock();
 
  282                $ilCtrl->setParameter($this->parent_obj, 
"term_id", $term[
"id"]);
 
  289                        if ($nr_usage > 0 && $this->glossary->getId() == $term[
"glo_id"])
 
  291                                $this->tpl->setCurrentBlock(
"link_usage");
 
  292                                $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", $term[
"id"]);
 
  294                                $this->tpl->setVariable(
"LINK_USAGE",
 
  295                                        $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listUsages"));
 
  296                                $ilCtrl->setParameterByClass(
"ilglossarytermgui", 
"term_id", 
"");
 
  297                                $this->tpl->parseCurrentBlock();
 
  301                                $this->tpl->setCurrentBlock(
"usage");
 
  303                                $this->tpl->parseCurrentBlock();
 
  305                        $this->tpl->setCurrentBlock(
"td_usage");
 
  306                        $this->tpl->parseCurrentBlock();
 
  312                        $this->tpl->setCurrentBlock(
"glossary");
 
  314                        $this->tpl->parseCurrentBlock();
 
  320                        $this->tpl->setCurrentBlock(
"td_lang");
 
  321                        $this->tpl->setVariable(
"TEXT_LANGUAGE", 
$lng->txt(
"meta_l_".$term[
"language"]));
 
  322                        $this->tpl->parseCurrentBlock();
 
  326                foreach ($this->adv_cols_order as $c)
 
  330                                $this->tpl->setCurrentBlock(
"td");
 
  331                                $this->tpl->setVariable(
"TD_VAL", $term[
"term"]);
 
  332                                $this->tpl->parseCurrentBlock();
 
  336                                if (in_array(
"md_".$c[
"id"], $this->selected_cols))
 
  338                                        $id = (int) $c[
"id"];
 
  341                                        if(isset($term[
"md_".$id.
"_presentation"]))
 
  343                                                $pb = $term[
"md_".$id.
"_presentation"]->getHTML();
 
  350                                        $this->tpl->setCurrentBlock(
"td");                                                                              
 
  351                                        $this->tpl->setVariable(
"TD_VAL", $val);
 
  352                                        $this->tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
Glossary definition page object.
static getDefinitionList($a_term_id)
static
static getInstance()
Get instance.
static hasReferences($a_glossary_id)
Check if a glossary uses references.
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
static getInstance()
Singleton: get instance.
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.
showGlossaryColumn()
Show glossary column.
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.