4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
36 $a_base_cmd =
"HeaderTitle",
38 $a_fallback_mode =
false,
43 $this->ctrl = $DIC->ctrl();
44 $this->lng = $DIC->language();
45 $this->access = $DIC->access();
46 $ilCtrl = $DIC->ctrl();
49 $this->incl_desc = $a_incl_desc;
50 $this->base_cmd = $a_base_cmd;
51 $this->master_lang = $a_master_lang;
52 $this->fallback_mode = $a_fallback_mode;
53 $this->fallback_lang = $a_fallback_lang;
58 $this->
addColumn($this->lng->txt(
"language"),
"",
"");
59 $this->
addColumn($this->lng->txt(
"default"),
"",
"");
60 $this->
addColumn($this->lng->txt(
"title"),
"",
"");
62 $this->
addColumn($this->lng->txt(
"description"),
"",
"");
67 $this->
setRowTemplate(
"tpl.obj_translation2_row.html",
"Services/Object");
82 if ($this->fallback_mode) {
99 if (!$a_set[
"default"] && $a_set[
"lang"] != $this->master_lang) {
100 $this->tpl->setCurrentBlock(
"cb");
101 $this->tpl->setVariable(
"CB_NR", $this->nr);
102 $this->tpl->parseCurrentBlock();
105 if ($this->master_lang ==
"") {
106 $this->tpl->setCurrentBlock(
"rb");
107 $this->tpl->setVariable(
"RB_NR", $this->nr);
108 if ($a_set[
"default"]) {
109 $this->tpl->setVariable(
"DEF_CHECKED",
"checked=\"checked\"");
111 $this->tpl->parseCurrentBlock();
112 } elseif ($a_set[
"lang"] == $this->master_lang) {
113 $this->tpl->setVariable(
"MASTER_LANG",
$lng->txt(
"obj_master_lang"));
115 if ($this->master_lang !=
"" && $a_set[
"lang"] == $this->fallback_lang) {
116 $this->tpl->setVariable(
"FALLBACK_LANG",
$lng->txt(
"obj_fallback_lang"));
119 if ($this->incl_desc) {
120 $this->tpl->setCurrentBlock(
"desc_row");
122 $this->tpl->setVariable(
"DNR", $this->nr);
123 $this->tpl->parseCurrentBlock();
126 $this->tpl->setVariable(
"NR", $this->nr);
129 include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
131 $this->tpl->setVariable(
135 "lang[" . $this->nr .
"]",
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
TableGUI class for title/description translations.
prepareOutput()
Prepare output.
__construct( $a_parent_obj, $a_parent_cmd, $a_incl_desc=true, $a_base_cmd="HeaderTitle", $a_master_lang="", $a_fallback_mode=false, $a_fallback_lang="")
Constructor.
fillRow($a_set)
Fill table row.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
__construct(Container $dic, ilPlugin $plugin)
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.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
setLimit($a_limit=0, $a_default_limit=0)