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 require_once "class.ilObjectGUI.php";
00025
00036 class ilObjRoleTemplateGUI extends ilObjectGUI
00037 {
00043 var $type;
00044
00050 var $rolf_ref_id;
00056 function ilObjRoleTemplateGUI($a_data,$a_id,$a_call_by_reference)
00057 {
00058 $this->type = "rolt";
00059 $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
00060 $this->rolf_ref_id =& $this->ref_id;
00061 $this->ctrl->saveParameter($this, "obj_id");
00062 }
00063
00064 function &executeCommand()
00065 {
00066 global $rbacsystem;
00067
00068 if($this->ctrl->getTargetScript() == 'role.php')
00069 {
00070 $this->__prepareOutput();
00071 }
00072 else
00073 {
00074 $this->prepareOutput();
00075 }
00076
00077 $next_class = $this->ctrl->getNextClass($this);
00078 $cmd = $this->ctrl->getCmd();
00079
00080 switch($next_class)
00081 {
00082 default:
00083 if(!$cmd)
00084 {
00085 $cmd = "perm";
00086 }
00087 $cmd .= "Object";
00088 $this->$cmd();
00089
00090 break;
00091 }
00092
00093 return true;
00094 }
00095
00096
00102 function createObject()
00103 {
00104 global $rbacsystem;
00105
00106 if (!$rbacsystem->checkAccess("create_rolt", $this->rolf_ref_id))
00107 {
00108 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
00109 }
00110 else
00111 {
00112
00113 $data = array();
00114 $data["fields"] = array();
00115 $data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
00116 $data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
00117
00118 $this->getTemplateFile("edit","role");
00119
00120 foreach ($data["fields"] as $key => $val)
00121 {
00122 $this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
00123 $this->tpl->setVariable(strtoupper($key), $val);
00124
00125 if ($this->prepare_output)
00126 {
00127 $this->tpl->parseCurrentBlock();
00128 }
00129 }
00130
00131 $this->tpl->setCurrentBlock("protect_permissions");
00132 $protect_permissions = $_SESSION["error_post_vars"]["Fobject"]["protect_permissions"] ? "checked=\"checked\"" : "";
00133 $this->tpl->setVariable("TXT_PROTECT_PERMISSIONS",$this->lng->txt("role_protect_permissions"));
00134 $this->tpl->setVariable("PROTECT_PERMISSIONS",$protect_permissions);
00135 $this->tpl->parseCurrentBlock();
00136
00137 $this->ctrl->setParameter($this, "new_type", $this->type);
00138 $this->tpl->setVariable("FORMACTION",
00139 $this->ctrl->getFormAction($this));
00140 $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($this->type."_new"));
00141 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
00142 $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($this->type."_add"));
00143 $this->tpl->setVariable("CMD_SUBMIT", "save");
00144 $this->tpl->setVariable("TARGET", $this->getTargetFrame("save"));
00145 $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
00146 }
00147 }
00148
00149
00155 function saveObject()
00156 {
00157 global $rbacsystem,$rbacadmin, $rbacreview;
00158
00159
00160
00161 if (!$rbacsystem->checkAccess("create_rolt",$this->rolf_ref_id))
00162 {
00163 $this->ilias->raiseError($this->lng->txt("msg_no_perm_create_rolt"),$this->ilias->error_obj->WARNING);
00164 }
00165
00166
00167 if (empty($_POST["Fobject"]["title"]))
00168 {
00169 $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
00170 }
00171
00172
00173 if ($rbacreview->roleExists($_POST["Fobject"]["title"]))
00174 {
00175 $this->ilias->raiseError($this->lng->txt("msg_role_exists1")." '".ilUtil::stripSlashes($_POST["Fobject"]["title"])."' ".
00176 $this->lng->txt("msg_role_exists2"),$this->ilias->error_obj->MESSAGE);
00177 }
00178
00179
00180 if (substr($_POST["Fobject"]["title"],0,3) == "il_")
00181 {
00182 $this->ilias->raiseError($this->lng->txt("msg_role_reserved_prefix"),$this->ilias->error_obj->MESSAGE);
00183 }
00184
00185
00186 include_once("./classes/class.ilObjRoleTemplate.php");
00187 $roltObj = new ilObjRoleTemplate();
00188 $roltObj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
00189 $roltObj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
00190 $roltObj->create();
00191 $rbacadmin->assignRoleToFolder($roltObj->getId(), $this->rolf_ref_id,'n');
00192 $rbacadmin->setProtected($this->rolf_ref_id,$roltObj->getId(),ilUtil::tf2yn($_POST["Fobject"]["protect_permissions"]));
00193
00194 sendInfo($this->lng->txt("rolt_added"),true);
00195 $this->ctrl->returnToParent($this);
00196 }
00197
00203 function permObject()
00204 {
00205 global $rbacadmin, $rbacreview, $rbacsystem,$objDefinition;
00206
00207 if (!$rbacsystem->checkAccess('write',$this->rolf_ref_id))
00208 {
00209 $this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->WARNING);
00210 exit();
00211 }
00212
00213 $to_filter = $objDefinition->getSubobjectsToFilter();
00214
00215 $tpl_filter = array();
00216 $internal_tpl = false;
00217
00218 if (($internal_tpl = $this->object->isInternalTemplate()))
00219 {
00220 $tpl_filter = $this->object->getFilterOfInternalTemplate();
00221 }
00222
00223
00224 $q = "SELECT ta.typ_id,obj.title,ops.ops_id,ops.operation FROM rbac_ta AS ta ".
00225 "LEFT JOIN object_data AS obj ON obj.obj_id=ta.typ_id ".
00226 "LEFT JOIN rbac_operations AS ops ON ops.ops_id=ta.ops_id";
00227 $r = $this->ilias->db->query($q);
00228
00229 while ($row = $r->fetchRow(DB_FETCHMODE_OBJECT))
00230 {
00231
00232 if(in_array($row->title,$to_filter))
00233 {
00234 continue;
00235 }
00236
00237 if ($internal_tpl and !in_array($row->title,$tpl_filter))
00238 {
00239 continue;
00240 }
00241
00242 $rbac_objects[$row->typ_id] = array("obj_id" => $row->typ_id,
00243 "type" => $row->title
00244 );
00245
00246 $rbac_operations[$row->typ_id][$row->ops_id] = array(
00247 "ops_id" => $row->ops_id,
00248 "title" => $row->operation,
00249 "name" => $this->lng->txt($row->title."_".$row->operation)
00250 );
00251 }
00252
00253 foreach ($rbac_objects as $key => $obj_data)
00254 {
00255 $rbac_objects[$key]["name"] = $this->lng->txt("obj_".$obj_data["type"]);
00256 $rbac_objects[$key]["ops"] = $rbac_operations[$key];
00257 }
00258
00259 sort($rbac_objects);
00260
00261 foreach ($rbac_objects as $key => $obj_data)
00262 {
00263 sort($rbac_objects[$key]["ops"]);
00264 }
00265
00266
00267 $rbac_objects = ilUtil::sortArray($rbac_objects,"name","asc");
00268
00269
00270 foreach ($rbac_objects as $key => $obj_data)
00271 {
00272 $arr_selected = $rbacreview->getOperationsOfRole($this->object->getId(), $obj_data["type"], $this->rolf_ref_id);
00273 $arr_checked = array_intersect($arr_selected,array_keys($rbac_operations[$obj_data["obj_id"]]));
00274
00275 foreach ($rbac_operations[$obj_data["obj_id"]] as $operation)
00276 {
00277 $checked = in_array($operation["ops_id"],$arr_checked);
00278 $disabled = false;
00279
00280
00281 $box = ilUtil::formCheckBox($checked,"template_perm[".$obj_data["type"]."][]",$operation["ops_id"],$disabled);
00282 $output["perm"][$obj_data["obj_id"]][$operation["ops_id"]] = $box;
00283 }
00284 }
00285
00286
00287 $output["col_anz"] = count($rbac_objects);
00288 $output["txt_save"] = $this->lng->txt("save");
00289 $output["check_protected"] = ilUtil::formCheckBox($rbacreview->isProtected($this->rolf_ref_id,$this->object->getId()),"protected",1);
00290 $output["text_protected"] = $this->lng->txt("role_protect_permissions");
00291
00292
00293
00294
00295
00296 $output["message_middle"] = $this->lng->txt("adopt_perm_from_template");
00297
00298
00299 if ($this->object->getId() == SYSTEM_ROLE_ID)
00300 {
00301 $output["adopt"] = array();
00302 sendinfo($this->lng->txt("msg_sysrole_not_editable"));
00303 }
00304 else
00305 {
00306
00307 $parent_role_ids = $rbacreview->getParentRoleIds($this->rolf_ref_id,true);
00308
00309
00310 ksort($parent_role_ids);
00311
00312 foreach ($parent_role_ids as $key => $par)
00313 {
00314 if ($par["obj_id"] != SYSTEM_ROLE_ID)
00315 {
00316 $radio = ilUtil::formRadioButton(0,"adopt",$par["obj_id"]);
00317 $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
00318 $output["adopt"][$key]["check_adopt"] = $radio;
00319 $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
00320 $output["adopt"][$key]["role_name"] = $par["title"];
00321 }
00322 }
00323
00324 $output["formaction_adopt"] = $this->ctrl->getFormAction($this);
00325
00326 }
00327
00328 $output["formaction"] =
00329 $this->ctrl->getFormAction($this);
00330
00331 $this->data = $output;
00332
00333
00334
00335
00336
00337
00338 $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
00339 $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00340 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.adm_perm_role.html");
00341
00342 foreach ($rbac_objects as $obj_data)
00343 {
00344
00345 $this->tpl->setCurrentBlock("object_operations");
00346
00347 foreach ($obj_data["ops"] as $operation)
00348 {
00349 $ops_ids[] = $operation["ops_id"];
00350
00351 $css_row = ilUtil::switchColor($key, "tblrow1", "tblrow2");
00352 $this->tpl->setVariable("CSS_ROW",$css_row);
00353 $this->tpl->setVariable("PERMISSION",$operation["name"]);
00354 $this->tpl->setVariable("CHECK_PERMISSION",$this->data["perm"][$obj_data["obj_id"]][$operation["ops_id"]]);
00355 $this->tpl->parseCurrentBlock();
00356 }
00357
00358
00359 $this->tpl->setCurrentBlock("object_type");
00360 $this->tpl->setVariable("TXT_OBJ_TYPE",$obj_data["name"]);
00361
00362
00363 if ($this->objDefinition->getDevMode($obj_data["type"]))
00364 {
00365 $this->tpl->setVariable("TXT_NOT_IMPL", "(".$this->lng->txt("not_implemented_yet").")");
00366 }
00367 else if ($obj_data["type"] == "icrs" and !$this->ilias->getSetting("ilinc_active"))
00368 {
00369 $this->tpl->setVariable("TXT_NOT_IMPL", "(".$this->lng->txt("not_enabled_or_configured").")");
00370 }
00371
00372
00373 $this->tpl->setVariable("JS_VARNAME","template_perm_".$obj_data["type"]);
00374 $this->tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($ops_ids));
00375 $this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
00376 $this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
00377
00378
00379 $this->tpl->parseCurrentBlock();
00380
00381 }
00382
00383
00384 foreach ($this->data["adopt"] as $key => $value)
00385 {
00386 $this->tpl->setCurrentBlock("ADOPT_PERM_ROW");
00387 $this->tpl->setVariable("CSS_ROW_ADOPT",$value["css_row_adopt"]);
00388 $this->tpl->setVariable("CHECK_ADOPT",$value["check_adopt"]);
00389 $this->tpl->setVariable("TYPE",$value["type"]);
00390 $this->tpl->setVariable("ROLE_NAME",$value["role_name"]);
00391 $this->tpl->parseCurrentBlock();
00392 }
00393
00394 $this->tpl->setCurrentBlock("ADOPT_PERM_FORM");
00395 $this->tpl->setVariable("MESSAGE_MIDDLE",$this->data["message_middle"]);
00396 $this->tpl->setVariable("FORMACTION_ADOPT",$this->data["formaction_adopt"]);
00397 $this->tpl->parseCurrentBlock();
00398
00399
00400 $this->tpl->setCurrentBlock("tblfooter_protected");
00401 $this->tpl->setVariable("COL_ANZ",3);
00402 $this->tpl->setVariable("CHECK_BOTTOM",$this->data["check_protected"]);
00403 $this->tpl->setVariable("MESSAGE_TABLE",$this->data["text_protected"]);
00404 $this->tpl->parseCurrentBlock();
00405
00406 $this->tpl->setCurrentBlock("tblfooter_standard");
00407 $this->tpl->setVariable("COL_ANZ_PLUS",4);
00408 $this->tpl->setVariable("TXT_SAVE",$this->data["txt_save"]);
00409 $this->tpl->parseCurrentBlock();
00410
00411
00412 $this->tpl->setCurrentBlock("adm_content");
00413 $this->tpl->setVariable("TBL_TITLE_IMG",ilUtil::getImagePath("icon_".$this->object->getType().".gif"));
00414 $this->tpl->setVariable("TBL_TITLE_IMG_ALT",$this->lng->txt($this->object->getType()));
00415 $this->tpl->setVariable("TBL_HELP_IMG",ilUtil::getImagePath("icon_help.gif"));
00416 $this->tpl->setVariable("TBL_HELP_LINK","tbl_help.php");
00417 $this->tpl->setVariable("TBL_HELP_IMG_ALT",$this->lng->txt("help"));
00418
00419
00420 if (substr($this->object->getTitle(),0,3) == "il_")
00421 {
00422 $desc = $this->lng->txt("predefined_template");
00423 }
00424
00425 $description = "<br/> <span class=\"small\">".$desc."</span>";
00426
00427
00428 if (substr($this->object->getTitle(),0,3) == "il_")
00429 {
00430 include_once('class.ilObjRole.php');
00431
00432 $title = ilObjRole::_getTranslation($this->object->getTitle())." (".$this->object->getTitle().")";
00433 }
00434 else
00435 {
00436 $title = $this->object->getTitle();
00437 }
00438
00439 $this->tpl->setVariable("TBL_TITLE",$title.$description);
00440
00441 $this->tpl->setVariable("TXT_PERMISSION",$this->data["txt_permission"]);
00442 $this->tpl->setVariable("FORMACTION",$this->data["formaction"]);
00443 $this->tpl->parseCurrentBlock();
00444 }
00445
00446
00452 function permSaveObject()
00453 {
00454 global $rbacadmin, $rbacsystem, $rbacreview,$objDefinition;
00455
00456 if (!$rbacsystem->checkAccess('write',$this->rolf_ref_id))
00457 {
00458 $this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->WARNING);
00459 }
00460 else
00461 {
00462
00463 $rbacadmin->deleteRolePermission($this->object->getId(), $this->rolf_ref_id);
00464
00465 foreach ($_POST["template_perm"] as $key => $ops_array)
00466 {
00467
00468 $rbacadmin->setRolePermission($this->object->getId(), $key,$ops_array,$this->rolf_ref_id);
00469 }
00470 }
00471
00472
00473 $this->object->update();
00474
00475
00476 $rbacadmin->setProtected($this->rolf_ref_id,$this->object->getId(),ilUtil::tf2yn($_POST['protected']));
00477
00478 sendinfo($this->lng->txt("saved_successfully"),true);
00479
00480 $this->ctrl->redirect($this, "perm");
00481 }
00482
00488 function adoptPermSaveObject()
00489 {
00490 global $rbacadmin, $rbacsystem, $rbacreview;
00491
00492 if (!$rbacsystem->checkAccess('write',$this->rolf_ref_id))
00493 {
00494 $this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->WARNING);
00495 }
00496 elseif ($this->obj_id == $_POST["adopt"])
00497 {
00498 sendInfo($this->lng->txt("msg_perm_adopted_from_itself"),true);
00499 }
00500 else
00501 {
00502 $rbacadmin->deleteRolePermission($this->obj_id, $this->rolf_ref_id);
00503 $parentRoles = $rbacreview->getParentRoleIds($this->rolf_ref_id,true);
00504 $rbacadmin->copyRolePermission($_POST["adopt"],$parentRoles[$_POST["adopt"]]["parent"],
00505 $this->rolf_ref_id,$this->obj_id);
00506
00507 $this->object->update();
00508
00509
00510 $obj_data =& $this->ilias->obj_factory->getInstanceByObjId($_POST["adopt"]);
00511 sendInfo($this->lng->txt("msg_perm_adopted_from1")." '".$obj_data->getTitle()."'.<br/>".$this->lng->txt("msg_perm_adopted_from2"),true);
00512 }
00513
00514 $this->ctrl->redirect($this, "perm");
00515 }
00516
00522 function editObject()
00523 {
00524 global $rbacsystem, $rbacreview;
00525
00526 if (!$rbacsystem->checkAccess("write", $this->rolf_ref_id))
00527 {
00528 $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
00529 }
00530
00531 $this->getTemplateFile("edit","role");
00532
00533 if ($_SESSION["error_post_vars"])
00534 {
00535
00536 if (substr($this->object->getTitle(),0,3) != "il_")
00537 {
00538 $this->tpl->setVariable("TITLE",ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"]),true);
00539 }
00540
00541 $this->tpl->setVariable("DESC",ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]));
00542 $protect_permissions = ($_SESSION["error_post_vars"]["Fobject"]["protect_permissions"]) ? "checked=\"checked\"" : "";
00543 }
00544 else
00545 {
00546 if (substr($this->object->getTitle(),0,3) != "il_")
00547 {
00548 $this->tpl->setVariable("TITLE",ilUtil::prepareFormOutput($this->object->getTitle()));
00549 }
00550
00551 $this->tpl->setVariable("DESC",ilUtil::stripSlashes($this->object->getDescription()));
00552 $protect_permissions = $rbacreview->isProtected($this->rolf_ref_id,$this->object->getId()) ? "checked=\"checked\"" : "";
00553 }
00554
00555 $obj_str = "&obj_id=".$this->obj_id;
00556
00557 $this->tpl->setVariable("TXT_TITLE",$this->lng->txt("title"));
00558 $this->tpl->setVariable("TXT_DESC",$this->lng->txt("desc"));
00559
00560 $this->tpl->setCurrentBlock("protect_permissions");
00561 $this->tpl->setVariable("TXT_PROTECT_PERMISSIONS",$this->lng->txt('role_protect_permissions'));
00562 $this->tpl->setVariable("PROTECT_PERMISSIONS",$protect_permissions);
00563 $this->tpl->parseCurrentBlock();
00564
00565 $this->tpl->setVariable("FORMACTION",
00566 $this->ctrl->getFormAction($this));
00567 $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($this->object->getType()."_edit"));
00568 $this->tpl->setVariable("TARGET", $this->getTargetFrame("update"));
00569 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
00570 $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
00571 $this->tpl->setVariable("CMD_SUBMIT", "update");
00572 $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
00573
00574 if (substr($this->object->getTitle(),0,3) == "il_")
00575 {
00576 $this->tpl->setVariable("SHOW_TITLE",$this->object->getTitle());
00577 }
00578 }
00579
00583 function getAdminTabs(&$tabs_gui)
00584 {
00585 $this->getTabs($tabs_gui);
00586 }
00587
00588 function getTabs(&$tabs_gui)
00589 {
00590 global $rbacsystem,$rbacreview;
00591
00592 if ($rbacsystem->checkAccess('write',$this->rolf_ref_id))
00593 {
00594 $tabs_gui->addTarget("edit_properties",
00595 $this->ctrl->getLinkTarget($this, "edit"),
00596 array("edit","update"), get_class($this));
00597
00598 $tabs_gui->addTarget("default_perm_settings",
00599 $this->ctrl->getLinkTarget($this, "perm"),
00600 array("perm"), get_class($this));
00601 }
00602 }
00603
00604
00609 function cancelObject()
00610 {
00611 sendInfo($this->lng->txt("action_aborted"),true);
00612
00613 $this->ctrl->redirectByClass("ilobjrolefoldergui","view");
00614 }
00615
00616
00617
00623 function updateObject()
00624 {
00625 global $rbacsystem, $rbacadmin, $rbacreview;
00626
00627
00628 if (!$rbacsystem->checkAccess("write", $this->rolf_ref_id))
00629 {
00630 $this->ilias->raiseError($this->lng->txt("msg_no_perm_modify_rolt"),$this->ilias->error_obj->WARNING);
00631 }
00632
00633 if (substr($this->object->getTitle(),0,3) != "il_")
00634 {
00635
00636 if (empty($_POST["Fobject"]["title"]))
00637 {
00638 $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
00639 }
00640
00641
00642 if (substr($_POST["Fobject"]["title"],0,3) == "il_")
00643 {
00644 $this->ilias->raiseError($this->lng->txt("msg_role_reserved_prefix"),$this->ilias->error_obj->MESSAGE);
00645 }
00646
00647
00648 if ($rbacreview->roleExists($_POST["Fobject"]["title"],$this->object->getId()))
00649 {
00650 $this->ilias->raiseError($this->lng->txt("msg_role_exists1")." '".ilUtil::stripSlashes($_POST["Fobject"]["title"])."' ".
00651 $this->lng->txt("msg_role_exists2"),$this->ilias->error_obj->MESSAGE);
00652 }
00653
00654
00655 $this->object->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
00656 }
00657
00658 $this->object->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
00659 $rbacadmin->setProtected($this->rolf_ref_id,$this->object->getId(),ilUtil::tf2yn($_POST["Fobject"]["protect_permissions"]));
00660 $this->object->update();
00661
00662 sendInfo($this->lng->txt("saved_successfully"),true);
00663
00664 $this->ctrl->returnToParent($this);
00665 }
00666
00671 function addAdminLocatorItems()
00672 {
00673 global $ilLocator;
00674
00675 if ($_GET["admin_mode"] == "settings")
00676 {
00677 $ilLocator->addItem($this->lng->txt("administration"),
00678 $this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset"),
00679 ilFrameTargetInfo::_getFrame("MainContent"));
00680
00681 $ilLocator->addItem(ilObject::_lookupTitle(
00682 ilObject::_lookupObjId($_GET["ref_id"])),
00683 $this->ctrl->getLinkTargetByClass("ilobjrolefoldergui", "view"));
00684
00685 $ilLocator->addItem($this->object->getTitle(),
00686 $this->ctrl->getLinkTarget($this, "perm"));
00687 }
00688 else
00689 {
00690
00691 }
00692
00693 }
00694
00695 function showUpperIcon()
00696 {
00697 global $tree, $tpl, $objDefinition;
00698
00699 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
00700 {
00701 $tpl->setUpperIcon(
00702 $this->ctrl->getLinkTargetByClass("ilobjrolefoldergui", "view"));
00703 }
00704 else
00705 {
00706 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
00707 $this->object->getRefId() != SYSTEM_FOLDER_ID)
00708 {
00709 $par_id = $tree->getParentId($this->object->getRefId());
00710 $tpl->setUpperIcon("repository.php?ref_id=".$par_id);
00711 }
00712 }
00713 }
00714
00715
00716 }
00717 ?>