4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
19 function __construct($a_parent_obj, $a_parent_cmd =
"", $a_has_write =
false)
23 $this->has_write = (bool)$a_has_write;
25 parent::__construct($a_parent_obj, $a_parent_cmd);
27 $this->
setId(
"repnwitgrptbl");
29 $this->
setTitle($lng->txt(
"rep_new_item_groups"));
35 $this->
addColumn($lng->txt(
"cmps_add_new_rank"),
"");
37 $this->
addColumn($lng->txt(
"rep_new_item_group_nr_subitems"),
"");
41 $this->
addColumn($lng->txt(
"action"),
"");
46 $this->
addCommandButton(
"saveNewItemGroupOrder", $lng->txt(
"cmps_save_options"));
47 $this->
addMultiCommand(
"confirmDeleteNewItemGroup", $lng->txt(
"delete"));
52 $this->
setRowTemplate(
"tpl.table_row_new_item_group.html",
"Services/Repository");
72 ilUtil::sendInfo(sprintf($lng->txt(
"rep_new_item_group_unassigned_subitems"),
sizeof($subitems[0])));
80 "pos" => $item[
"pos"],
81 "title" => $item[
"title"],
82 "type" => $item[
"type"],
83 "subitems" =>
sizeof($subitems[$item[
"id"]])
98 $this->tpl->setVariable(
"VAR_MULTI",
"grp_id[]");
99 $this->tpl->setVariable(
"VAL_MULTI", $a_set[
"id"]);
102 $this->tpl->setVariable(
"VAR_POS",
"grp_order[".$a_set[
"id"].
"]");
103 $this->tpl->setVariable(
"VAL_POS", $a_set[
"pos"]);
104 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
108 $this->tpl->setVariable(
"VAL_ITEMS", $a_set[
"subitems"]);
112 $ilCtrl->setParameter($this->parent_obj,
"grp_id", $a_set[
"id"]);
113 $url = $ilCtrl->getLinkTarget($this->parent_obj,
"editNewItemGroup");
114 $ilCtrl->setParameter($this->parent_obj,
"grp_id",
"");
116 $this->tpl->setVariable(
"URL_EDIT",
$url);
117 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
getGroups()
Get pages for list.
setExternalSorting($a_val)
Set external sorting.
TableGUI class for new item groups.
static getNewItemGroups()
static getNewItemGroupSubItems()
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct($a_parent_obj, $a_parent_cmd="", $a_has_write=false)
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setEnableHeader($a_enableheader)
Set Enable Header.
const NEW_ITEM_GROUP_TYPE_GROUP
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.
setLimit($a_limit=0, $a_default_limit=0)