ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilRoleDesktopItemSelector.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4/*
5* Repository Explorer
6*
7* @author Stefan Meyer <meyer@leifos.com>
8* @version $Id$
9*
10*/
11
12require_once("./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
13
14
16{
17
23 var $role_desk_obj = null;
24
25
28 var $ctrl;
29
38 function ilRoleDesktopItemSelector($a_target,$role_desk_item_obj)
39 {
40 global $tree,$ilCtrl;
41
42 $this->ctrl = $ilCtrl;
43
44 $this->role_desk_obj =& $role_desk_item_obj;
45
46 parent::ilExplorer($a_target);
47 $this->tree = $tree;
48 $this->root_id = $this->tree->readRootId();
49 $this->order_column = "title";
50
51 $this->setSessionExpandVariable("role_desk_item_link_expand");
52
53 $this->addFilter("adm");
54 $this->addFilter("rolf");
55 #$this->addFilter("chat");
56 #$this->addFilter('fold');
57
59 $this->setFiltered(true);
60
62 }
63
64 function buildLinkTarget($a_node_id, $a_type)
65 {
66 $this->ctrl->setParameterByClass('ilobjrolegui','item_id',$a_node_id);
67 return $this->ctrl->getLinkTargetByClass('ilobjrolegui','assignDesktopItem');
68
69 }
70
71 function buildFrameTarget($a_type, $a_child = 0, $a_obj_id = 0)
72 {
73 return '';
74 }
75
76 function isClickable($a_type, $a_ref_id)
77 {
78 global $rbacsystem;
79
80 return $rbacsystem->checkAccess('write',$a_ref_id) and !$this->role_desk_obj->isAssigned($a_ref_id);
81 }
82
83 function showChilds($a_ref_id)
84 {
85 global $rbacsystem;
86
87 if($a_ref_id)
88 {
89 return $rbacsystem->checkAccess('read',$a_ref_id);
90 }
91 return true;
92 }
93
94
102 function formatHeader($a_obj_id,$a_option)
103 {
104 global $lng, $ilias;
105
106 $tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
107
108 $tpl->setCurrentBlock("text");
109 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
110 $tpl->parseCurrentBlock();
111
112 //$tpl->setCurrentBlock("row");
113 //$tpl->parseCurrentBlock();
114
115 $this->output[] = $tpl->get();
116 }
117
118} // END class ilObjectSelector
119?>
global $tpl
Definition: ilias.php:8
const IL_FM_NEGATIVE
Class ilExplorer class for explorer view in admin frame.
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
addFilter($a_item)
adds item to the filter @access public
setTitleLength($a_length)
Set max title length.
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
setFiltered($a_bool)
active/deactivate the filter @access public
const TITLE_LENGTH
max length of object title
isClickable($a_type, $a_ref_id)
check if links for certain object type are activated
formatHeader($a_obj_id, $a_option)
overwritten method from base class @access public
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
ilRoleDesktopItemSelector($a_target, $role_desk_item_obj)
Constructor @access public.
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
showChilds($a_ref_id)
determines wether the childs of an object should be shown or not note: this standard implementation a...
special template class to simplify handling of ITX/PEAR
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40