36 require_once
"class.ilObjectGUI.php";
51 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
63 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
65 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
69 $this->data = array();
70 $this->data[
"data"] = array();
71 $this->data[
"ctrl"] = array();
73 $this->data[
"cols"] = array(
"type",
"title",
"last_change");
75 $this->maxcount = count($this->data[
"data"]);
78 foreach ($this->data[
"data"] as $key => $val)
80 $this->data[
"ctrl"][$key] = array(
81 "ref_id" => $this->
id,
82 "obj_id" => $val[
"obj_id"],
83 "type" => $val[
"type"],
86 unset($this->data[
"data"][$key][
"obj_id"]);
100 include_once
"./Services/Table/classes/class.ilTableGUI.php";
104 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
107 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
111 $obj_str = ($this->call_by_reference) ?
"" :
"&obj_id=".$this->obj_id;
112 $this->tpl->setVariable(
"FORMACTION",
113 $this->ctrl->getFormAction($this));
119 $tbl->setTitle($this->object->getTitle(),
"icon_".$this->object->getType().
"_b.gif",$this->lng->txt(
"obj_".$this->object->getType()));
120 $tbl->setHelp(
"tbl_help.php",
"icon_help.gif",$this->lng->txt(
"help"));
122 foreach ($this->data[
"cols"] as $val)
124 $header_names[] = $this->lng->txt($val);
127 $tbl->setHeaderNames($header_names);
130 $header_params = $this->ctrl->getParameterArray($this,
"view");
131 $tbl->setHeaderVars($this->data[
"cols"],$header_params);
132 $tbl->setColumnWidth(array(
"15",
"75%",
"25%"));
135 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
136 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
137 $tbl->setLimit(
$_GET[
"limit"]);
138 $tbl->setOffset(
$_GET[
"offset"]);
139 $tbl->setMaxCount($this->maxcount);
142 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
148 if (is_array($this->data[
"data"][0]))
151 for ($i=0; $i < count($this->data[
"data"]); $i++)
153 $data = $this->data[
"data"][$i];
154 $ctrl = $this->data[
"ctrl"][$i];
159 $this->tpl->setCurrentBlock(
"table_cell");
160 $this->tpl->setVariable(
"CELLSTYLE",
"tblrow1");
161 $this->tpl->parseCurrentBlock();
163 foreach (
$data as $key => $val)
222 $this->tpl->setCurrentBlock(
"tbl_content");
223 $this->tpl->setVariable(
"CSS_ROW", $css_row);
224 $this->tpl->parseCurrentBlock();
230 $this->tpl->setCurrentBlock(
"notfound");
231 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
232 $this->tpl->setVariable(
"NUM_COLS", $num);
233 $this->tpl->parseCurrentBlock();
239 $next_class = $this->ctrl->getNextClass($this);
240 $cmd = $this->ctrl->getCmd();
245 case 'ilpermissiongui':
246 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
248 $ret =& $this->ctrl->forwardCommand($perm_gui);
273 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
275 $tabs_gui->addTarget(
"settings",
276 $this->ctrl->getLinkTarget($this,
"view"), array(
"view",
""),
"",
"");
278 $tabs_gui->addTarget(
"perm_settings",
279 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');