4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
24 $this->folder = $a_folder;
26 parent::__construct($a_parent_obj, $a_parent_cmd);
31 $this->
addColumn($this->lng->txt(
"language"));
32 $this->
addColumn($this->lng->txt(
"status"));
33 $this->
addColumn($this->lng->txt(
"users"));
34 $this->
addColumn($this->lng->txt(
"last_refresh"));
35 if ($ilSetting->get(
"lang_ext_maintenance"))
37 $this->
addColumn($this->lng->txt(
"last_change"));
43 if ($ilSetting->get(
"lang_ext_maintenance"))
45 $this->
setRowTemplate(
"tpl.lang_list_row_extended.html",
"Services/Language");
49 $this->
setRowTemplate(
"tpl.lang_list_row.html",
"Services/Language");
54 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
65 $this->
addMultiCommand(
"setSystemLanguage", $lng->txt(
"setSystemLanguage"));
66 $this->
addMultiCommand(
"setUserLanguage", $lng->txt(
"setUserLanguage"));
75 $languages = $this->folder->getLanguages();
77 foreach ($languages as $k => $l)
79 $data[] = array_merge($l, array(
"key" => $k));
100 $status =
"<span class=\"small\"> (".$lng->txt($a_set[
"status"]).
")</span>";
104 switch ($a_set[
"info"])
106 case "file_not_found":
107 $remark =
"<span class=\"smallred\"> ".$lng->txt($a_set[
"info"]).
"</span>";
118 if($ilSetting->get(
"lang_ext_maintenance")
119 and $ilSetting->get(
"lang_translate_". $a_set[
'key'],
false))
121 $remark .= $remark ?
'<br />' :
'';
122 $remark .=
"<span class=\"smallgreen\"> ".$lng->txt(
'language_translation_enabled').
"</span>";
126 if ($rbacsystem->checkAccess(
"write", $this->folder->getRefId()))
128 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
130 if (substr($lang_data[
"description"],0,9) ==
"installed")
132 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id",$a_set[
"obj_id"]);
133 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
134 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
139 if ($a_set[
"desc"] !=
"not_installed")
141 $this->tpl->setVariable(
"LAST_REFRESH",
144 if ($ilSetting->get(
"lang_ext_maintenance"))
147 $this->tpl->setVariable(
"LAST_CHANGE",
155 if ($rbacsystem->checkAccess(
"write",$this->folder->getRefId()))
157 if ($ilSetting->get(
"lang_ext_maintenance") ==
"1")
159 if (substr($a_set[
"description"],0,9) ==
"installed")
161 $ilCtrl->setParameterByClass(
"ilobjlanguageextgui",
"obj_id", $a_set[
"obj_id"]);
162 $url = $ilCtrl->getLinkTargetByClass(
"ilobjlanguageextgui",
"");
163 $a_set[
"name"] =
'<a href="'.$url.
'">'.$a_set[
"name"].
'</a>';
168 $this->tpl->setVariable(
"VAL_LANGUAGE", $a_set[
"name"].$status);
169 $this->tpl->setVariable(
"VAL_STATUS", $lng->txt($a_set[
"desc"]).
"<br/>".$remark);
170 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
static countUsers($a_lang)
Count number of users that use a language.
fillRow($a_set)
Fill table row.
getItems()
Get language data.
setLimit($a_limit=0, $a_default_limit=0)
set max.
_getLastLocalChange($a_key)
get the date of the last local change
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
static stableSortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false)
Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which h...
addMultiCommand($a_cmd, $a_text)
Add Command button.
static formatDate(ilDateTime $date)
Format a date public.
__construct($a_parent_obj, $a_parent_cmd, $a_folder)
Constructor.
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
setEnableHeader($a_enableheader)
Set Enable Header.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setEnableTitle($a_enabletitle)
Set Enable Title.