ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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(ilObjectListGUI::CONTEXT_WORKSPACE);
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->enableLink(false);
84 $item_list_gui->enablePath(false);
85 $item_list_gui->enableLinkedPath(false);
86 $item_list_gui->enableSearchFragments(true);
87 $item_list_gui->enableRelevance(false);
88 $item_list_gui->enableIcon(true);
89 $item_list_gui->enableTimings(false);
90 // $item_list_gui->enableCheckbox(false);
91 // $item_list_gui->setSeparateCommands(true);
92
93 $item_list_gui->enableNotes(true);
94 $item_list_gui->enableCopy($objDefinition->allowCopy($node["type"]));
95
96 if($node["type"] == "file")
97 {
98 $item_list_gui->enableRepositoryTransfer(true);
99 }
100
101 $item_list_gui->setContainerObject($this->parent_obj);
102
103 if(in_array($node["type"], array("file", "blog")))
104 {
105 // add "share" link
106 $ilCtrl->setParameterByClass("ilworkspaceaccessgui", "wsp_id", $node["wsp_id"]);
107 $share_link = $ilCtrl->getLinkTargetByClass(array("ilObj".$class."GUI", "ilworkspaceaccessgui"), "share");
108 $item_list_gui->addCustomCommand($share_link, "wsp_permissions");
109
110 // show "shared" status
111 if(in_array($node["obj_id"], $this->shared_objects))
112 {
113 $item_list_gui->addCustomProperty($this->lng->txt("status"), $this->lng->txt("wsp_status_shared"), true, true);
114 }
115 }
116
117 if($html = $item_list_gui->getListItemHTML($node["wsp_id"], $node["obj_id"],
118 $node["title"], $node["description"]))
119 {
120 $this->tpl->setVariable("ITEM_LIST_NODE", $html);
121 }
122 }
123
124}
125
126?>
$location
Definition: buildRTE.php:44
An exception for terminatinating execution or to throw for unit testing.
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
$ilUser
Definition: imgupload.php:18