ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjWorkspaceFolderTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
14include_once "Services/Table/classes/class.ilTable2GUI.php";
15
17{
18 function __construct($a_parent_obj, $a_parent_cmd, $a_node_id, $a_access_handler)
19 {
20 global $ilCtrl;
21
22 $this->node_id = $a_node_id;
23 $this->setId("tbl_wfld");
24 $this->access_handler = $a_access_handler;
25
26 parent::__construct($a_parent_obj, $a_parent_cmd);
27
28 // $this->setTitle(":TODO:");
29 $this->setLimit(999);
30
31 $this->addColumn($this->lng->txt("content"));
32
33 // $this->setEnableHeader(true);
34 // $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
35 $this->setRowTemplate("tpl.list_row.html", "Modules/WorkspaceFolder");
36 //$this->disable("footer");
37 // $this->setEnableTitle(true);
38 $this->setEnableNumInfo(false);
39
40 $this->getItems();
41 }
42
43 protected function getItems()
44 {
45 global $ilUser;
46
47 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
48 $tree = new ilWorkspaceTree($ilUser->getId());
49 $nodes = $tree->getChilds($this->node_id, "title");
50
51 if(sizeof($nodes))
52 {
53 include_once("./Services/Object/classes/class.ilObjectListGUIPreloader.php");
55 foreach($nodes as $node)
56 {
57 $preloader->addItem($node["obj_id"], $node["type"]);
58 }
59 $preloader->preload();
60 unset($preloader);
61 }
62
63 $this->shared_objects = $this->access_handler->getObjectsIShare();
64
65 $this->setData($nodes);
66 }
67
68 protected function fillRow($node)
69 {
70 global $objDefinition, $ilCtrl;
71
72 $class = $objDefinition->getClassName($node["type"]);
73 $location = $objDefinition->getLocation($node["type"]);
74 $full_class = "ilObj".$class."ListGUI";
75
76 include_once($location."/class.".$full_class.".php");
77 $item_list_gui = new $full_class();
78
79 $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
80 $item_list_gui->enableDelete(true);
81 $item_list_gui->enableCut(true);
82 $item_list_gui->enableSubscribe(false);
83 $item_list_gui->enablePayment(false);
84 $item_list_gui->enableLink(false);
85 $item_list_gui->enablePath(false);
86 $item_list_gui->enableLinkedPath(false);
87 $item_list_gui->enableSearchFragments(true);
88 $item_list_gui->enableRelevance(false);
89 $item_list_gui->enableIcon(true);
90 $item_list_gui->enableTimings(false);
91 // $item_list_gui->enableCheckbox(false);
92 // $item_list_gui->setSeparateCommands(true);
93
94 $item_list_gui->enableNotes(true);
95 $item_list_gui->enableCopy($objDefinition->allowCopy($node["type"]));
96
97 if($node["type"] == "file")
98 {
99 $item_list_gui->enableRepositoryTransfer(true);
100 }
101
102 $item_list_gui->setContainerObject($this->parent_obj);
103
104 if(in_array($node["type"], array("file", "blog")))
105 {
106 // add "share" link
107 $ilCtrl->setParameterByClass("ilworkspaceaccessgui", "wsp_id", $node["wsp_id"]);
108 $share_link = $ilCtrl->getLinkTargetByClass(array("ilObj".$class."GUI", "ilworkspaceaccessgui"), "share");
109 $item_list_gui->addCustomCommand($share_link, "wsp_permissions");
110
111 // show "shared" status
112 if(in_array($node["obj_id"], $this->shared_objects))
113 {
114 $item_list_gui->addCustomProperty($this->lng->txt("status"), $this->lng->txt("wsp_status_shared"), true, true);
115 }
116 }
117
118 if($html = $item_list_gui->getListItemHTML($node["wsp_id"], $node["obj_id"],
119 $node["title"], $node["description"], false, false, "", ilObjectListGUI::CONTEXT_WORKSPACE))
120 {
121 $this->tpl->setVariable("ITEM_LIST_NODE", $html);
122 }
123 }
124
125}
126
127?>
$location
Definition: buildRTE.php:44
Class ilObjWorkspaceFolderTableGUI.
fillRow($node)
Standard Version of Fill Row.
__construct($a_parent_obj, $a_parent_cmd, $a_node_id, $a_access_handler)
Preloader for object list GUIs.
Class ilTable2GUI.
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.
setData($a_data)
set table data @access public
setEnableNumInfo($a_val)
Set enable num info.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
setId($a_val)
Set id.
Tree handler for personal workspace.
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15