Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 require_once("classes/class.ilExplorer.php");
00034
00035
00036 class ilRoleDesktopItemSelector extends ilExplorer
00037 {
00038
00044 var $role_desk_obj = null;
00045
00046
00047 var $root_id;
00048 var $output;
00049 var $ctrl;
00050
00051 var $selectable_type;
00052 var $ref_id;
00059 function ilRoleDesktopItemSelector($a_target,$role_desk_item_obj)
00060 {
00061 global $tree,$ilCtrl;
00062
00063 $this->ctrl = $ilCtrl;
00064
00065 $this->role_desk_obj =& $role_desk_item_obj;
00066
00067 parent::ilExplorer($a_target);
00068 $this->tree = $tree;
00069 $this->root_id = $this->tree->readRootId();
00070 $this->order_column = "title";
00071
00072 $this->setSessionExpandVariable("role_desk_item_link_expand");
00073
00074 $this->addFilter("adm");
00075 $this->addFilter("rolf");
00076 #$this->addFilter("chat");
00077 #$this->addFilter('fold');
00078
00079 $this->setFilterMode(IL_FM_NEGATIVE);
00080 $this->setFiltered(true);
00081
00082 }
00083
00084 function buildLinkTarget($a_node_id, $a_type)
00085 {
00086 $this->ctrl->setParameterByClass('ilobjrolegui','item_id',$a_node_id);
00087 return $this->ctrl->getLinkTargetByClass('ilobjrolegui','assignDesktopItem');
00088
00089 }
00090
00091 function buildFrameTarget($a_type, $a_child = 0, $a_obj_id = 0)
00092 {
00093 return '';
00094 }
00095
00096 function isClickable($a_type, $a_ref_id)
00097 {
00098 global $rbacsystem;
00099
00100 return $rbacsystem->checkAccess('write',$a_ref_id) and !$this->role_desk_obj->isAssigned($a_ref_id);
00101 }
00102
00103 function showChilds($a_ref_id)
00104 {
00105 global $rbacsystem;
00106
00107 if($a_ref_id)
00108 {
00109 return $rbacsystem->checkAccess('read',$a_ref_id);
00110 }
00111 return true;
00112 }
00113
00114
00122 function formatHeader($a_obj_id,$a_option)
00123 {
00124 global $lng, $ilias;
00125
00126 $tpl = new ilTemplate("tpl.tree.html", true, true);
00127
00128 $tpl->setCurrentBlock("text");
00129 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
00130 $tpl->parseCurrentBlock();
00131
00132 $tpl->setCurrentBlock("row");
00133 $tpl->parseCurrentBlock();
00134
00135 $this->output[] = $tpl->get();
00136 }
00137
00138 }
00139 ?>