4 include_once (
'./Services/Table/classes/class.ilTable2GUI.php');
19 public function __construct($a_parent_obj, $a_parent_cmd, $a_user_id, array $a_data = null)
23 $this->user_id = (int)$a_user_id;
24 $this->
setId(
'objownmgmt');
28 $this->
addColumn($lng->txt(
"title"),
"title");
29 $this->
addColumn($lng->txt(
"path"),
"path");
30 $this->
addColumn($lng->txt(
"action"),
"");
33 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
34 $this->
setRowTemplate(
"tpl.obj_ownership_row.html",
"Services/Object");
48 global $ilAccess,
$lng, $tree;
54 $is_admin = $ilAccess->checkAccess(
"visible",
"", SYSTEM_FOLDER_ID);
57 foreach($a_data as $id => $item)
63 foreach($refs as $idx =>
$ref_id)
70 $readable = $ilAccess->checkAccessOfUser($this->user_id,
"read",
"",
$ref_id, $a_type);
74 $readable = $is_admin;
82 "readable" => $readable);
93 global
$lng, $objDefinition;
96 if(!$objDefinition->isPlugin(
$row[
"type"]))
98 $txt_type = $lng->txt(
"obj_".
$row[
"type"]);
102 include_once(
"./Services/Component/classes/class.ilPlugin.php");
106 $this->tpl->setVariable(
"TITLE",
$row[
"title"]);
107 $this->tpl->setVariable(
"ALT_ICON", $txt_type);
109 $this->tpl->setVariable(
"PATH",
$row[
"path"]);
113 $this->tpl->setCurrentBlock(
"actions");
115 $this->tpl->parseCurrentBlock();
123 include_once
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
125 $agui->setId($this->
id.
"-".$a_ref_id);
126 $agui->setListTitle($lng->txt(
"actions"));
128 $ilCtrl->setParameter($this->parent_obj,
"ownid", $a_ref_id);
130 include_once
"Services/Link/classes/class.ilLink.php";
131 $agui->addItem($lng->txt(
"show"),
"",
135 $agui->addItem($lng->txt(
"move"),
"",
136 $ilCtrl->getLinkTarget($this->parent_obj,
"move"),
139 $agui->addItem($lng->txt(
"change_owner"),
"",
140 $ilCtrl->getLinkTarget($this->parent_obj,
"changeOwner"),
143 if(!in_array($a_type, array(
"crsr",
"catr")) && $objDefinition->allowExport($a_type))
145 $agui->addItem($lng->txt(
"export"),
"",
146 $ilCtrl->getLinkTarget($this->parent_obj,
"export"),
150 $agui->addItem($lng->txt(
"delete"),
"",
151 $ilCtrl->getLinkTarget($this->parent_obj,
"delete"),
154 $ilCtrl->setParameter($this->parent_obj,
"ownid",
"");
156 return $agui->getHTML();
165 $path_full = $tree->getPathFull($a_ref_id);
166 foreach($path_full as
$data)
168 if(++$counter < (count($path_full)-2))
172 if($a_ref_id != $data[
'ref_id'])
174 $path .=
" » ".$data[
'title'];