ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjOrgUnitListGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3require_once("./Services/Object/classes/class.ilObjectListGUI.php");
4
14
18 protected $tpl;
19
20
21 function __construct() {
22 global $tpl;
23 $this->ilObjectListGUI();
24 $this->tpl = $tpl;
25 //$this->enableComments(false, false);
26 }
27
28
32 function init() {
33 $this->static_link_enabled = true;
34 $this->delete_enabled = true;
35 $this->cut_enabled = true;
36 $this->info_screen_enabled = true;
37 $this->copy_enabled = false;
38 $this->subscribe_enabled = false;
39 $this->link_enabled = false;
40 $this->payment_enabled = false;
41
42 $this->type = "orgu";
43 $this->gui_class_name = "ilobjorgunitgui";
44
45 // general commands array
46 include_once('./Modules/OrgUnit/classes/class.ilObjOrgUnitAccess.php');
47 $this->commands = ilObjOrgUnitAccess::_getCommands();
48 }
49
50
54 public function insertTimingsCommand() {
55 return;
56 }
57
58
62 public function insertCommonSocialCommands() {
63 return;
64 }
65
66
71
72 if ($this->std_cmd_only) {
73 return;
74 }
75 $cmd_link = $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary");
76 $cmd_frame = $this->getCommandFrame("infoScreen");
77
78 $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("icon_info.svg"));
79 }
80
81
87 public function getCommandLink($a_cmd) {
88 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $this->ref_id);
89
90 return $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", $a_cmd);
91 }
92
93
94 public function insertIconsAndCheckboxes() {
95 global $lng, $ilias;
96 // FSX removed $this->getCheckboxStatus() in if-Statement: 0014726
97 if (!$ilias->getSetting('custom_icons')) {
98 parent::insertIconsAndCheckboxes();
99
100 return;
101 }
102 $icons_cache = ilObjOrgUnit::getIconsCache();
103 if (isset($icons_cache[$this->obj_id])) {
104 $icon_file = $icons_cache[$this->obj_id];
105 // icon link
106 if (!$this->default_command OR (!$this->getCommandsStatus() AND !$this->restrict_to_goto)) {
107 } else {
108 $this->tpl->setCurrentBlock("icon_link_s");
109
110 if ($this->default_command["frame"] != "") {
111 $this->tpl->setVariable("ICON_TAR", "target='" . $this->default_command["frame"] . "'");
112 }
113
114 $this->tpl->setVariable("ICON_HREF", $this->default_command["link"]);
115 $this->tpl->parseCurrentBlock();
116 $this->tpl->touchBlock("icon_link_e");
117 }
118 $this->enableIcon(false);
119 if($this->getContainerObject()->isActiveAdministrationPanel() && !$_SESSION['clipboard'])
120 {
121 $this->tpl->touchBlock("i_1"); // indent main div }
122 $this->tpl->touchBlock("d_2"); // indent main div } #0014913
123 }else{
124 $this->tpl->touchBlock("d_1");
125 }
126
127 parent::insertIconsAndCheckboxes();
128 $this->tpl->setCurrentBlock("icon");
129 $this->tpl->setVariable("ALT_ICON", $lng->txt("icon") . " " . $lng->txt("obj_" . $this->getIconImageType()));
130 $this->tpl->setVariable("SRC_ICON", $icon_file);
131 $this->tpl->parseCurrentBlock();
132 $this->enableIcon(true);
133 } else {
134 parent::insertIconsAndCheckboxes();
135 }
136 }
137}
138
139?>
$_SESSION["AccountId"]
Class ilObjOrgUnitListGUI.
insertCommonSocialCommands()
no social commands needed in orgunits.
insertIconsAndCheckboxes()
Insert icons and checkboxes.
insertInfoScreenCommand()
insert info screen command
insertTimingsCommand()
no timing commands needed in orgunits.
Class ilObjectListGUI.
getContainerObject()
get container object
getCommandFrame($a_cmd)
Get command target frame.
enableIcon($a_status)
En/Dis-able icons.
ilObjectListGUI()
constructor
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $lng
Definition: privfeed.php:40