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;
27 $this->
setId(
'objownmgmt');
29 $this->
addColumn($lng->txt(
"title"),
"title");
30 $this->
addColumn($lng->txt(
"path"),
"path");
31 $this->
addColumn($lng->txt(
"action"),
"");
34 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
35 $this->
setRowTemplate(
"tpl.obj_ownership_row.html",
"Services/Object");
49 global $ilAccess,
$lng, $tree;
55 $is_admin = $ilAccess->checkAccess(
"visible",
"", SYSTEM_FOLDER_ID);
58 foreach($a_data as $id => $item)
64 foreach($refs as $idx =>
$ref_id)
71 $readable = $ilAccess->checkAccessOfUser($this->user_id,
"read",
"",
$ref_id, $a_type);
75 $readable = $is_admin;
83 "readable" => $readable);
94 global
$lng, $objDefinition;
97 if(!$objDefinition->isPlugin(
$row[
"type"]))
99 $txt_type = $lng->txt(
"obj_".
$row[
"type"]);
103 include_once(
"./Services/Component/classes/class.ilPlugin.php");
107 $this->tpl->setVariable(
"TITLE",
$row[
"title"]);
108 $this->tpl->setVariable(
"ALT_ICON", $txt_type);
110 $this->tpl->setVariable(
"PATH",
$row[
"path"]);
114 $this->tpl->setCurrentBlock(
"actions");
116 $this->tpl->parseCurrentBlock();
124 include_once
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
126 $agui->setId($this->
id.
"-".$a_ref_id);
127 $agui->setListTitle($lng->txt(
"actions"));
129 $ilCtrl->setParameter($this->parent_obj,
"ownid", $a_ref_id);
131 include_once
"Services/Link/classes/class.ilLink.php";
132 $agui->addItem($lng->txt(
"show"),
"",
136 $agui->addItem($lng->txt(
"move"),
"",
137 $ilCtrl->getLinkTarget($this->parent_obj,
"move"),
140 $agui->addItem($lng->txt(
"change_owner"),
"",
141 $ilCtrl->getLinkTarget($this->parent_obj,
"changeOwner"),
144 if(!in_array($a_type, array(
"crsr",
"catr")) && $objDefinition->allowExport($a_type))
146 $agui->addItem($lng->txt(
"export"),
"",
147 $ilCtrl->getLinkTarget($this->parent_obj,
"export"),
151 $agui->addItem($lng->txt(
"delete"),
"",
152 $ilCtrl->getLinkTarget($this->parent_obj,
"delete"),
155 $ilCtrl->setParameter($this->parent_obj,
"ownid",
"");
157 return $agui->getHTML();
166 $path_full = $tree->getPathFull($a_ref_id);
167 foreach($path_full as
$data)
169 if(++$counter < (count($path_full)-2))
173 if($a_ref_id != $data[
'ref_id'])
175 $path .=
" » ".$data[
'title'];