ILIAS  release_7 Revision v7.30-3-g800a261c036
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 */
3
13{
14
18 protected $tpl;
19
20
21 public function __construct()
22 {
23 global $DIC;
24 $tpl = $DIC['tpl'];
26 $this->tpl = $tpl;
27 //$this->enableComments(false, false);
28 }
29
30
34 public function init()
35 {
36 $this->static_link_enabled = true;
37 $this->delete_enabled = true;
38 $this->cut_enabled = true;
39 $this->info_screen_enabled = true;
40 $this->copy_enabled = false;
41 $this->subscribe_enabled = false;
42 $this->link_enabled = false;
43
44 $this->type = "orgu";
45 $this->gui_class_name = "ilobjorgunitgui";
46
47 // general commands array
48 $this->commands = ilObjOrgUnitAccess::_getCommands();
49 }
50
51
55 public function insertTimingsCommand()
56 {
57 return;
58 }
59
60
64 public function insertCommonSocialCommands($a_header_actions = false)
65 {
66 return;
67 }
68
69
73 public function insertInfoScreenCommand()
74 {
75 if ($this->std_cmd_only) {
76 return;
77 }
78 $cmd_link = $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary");
79 $cmd_frame = $this->getCommandFrame("infoScreen");
80
81 $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("icon_info.svg"));
82 }
83
84
90 public function getCommandLink($a_cmd)
91 {
92 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $this->ref_id);
93
94 return $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", $a_cmd);
95 }
96
97
98 public function insertIconsAndCheckboxes()
99 {
100 global $DIC;
101 $lng = $DIC['lng'];
102 $ilias = $DIC['ilias'];
103 // FSX removed $this->getCheckboxStatus() in if-Statement: 0014726
104 if (!$ilias->getSetting('custom_icons')) {
105 parent::insertIconsAndCheckboxes();
106
107 return;
108 }
109 $icons_cache = ilObjOrgUnit::getIconsCache();
110 if (isset($icons_cache[$this->obj_id])) {
111 $icon_file = $icons_cache[$this->obj_id];
112 // icon link
113 if (!$this->default_command or (!$this->getCommandsStatus() and !$this->restrict_to_goto)) {
114 } else {
115 $this->tpl->setCurrentBlock("icon_link_s");
116
117 if ($this->default_command["frame"] != "") {
118 $this->tpl->setVariable("ICON_TAR", "target='" . $this->default_command["frame"] . "'");
119 }
120
121 $this->tpl->setVariable("ICON_HREF", $this->default_command["link"]);
122 $this->tpl->parseCurrentBlock();
123 $this->tpl->touchBlock("icon_link_e");
124 }
125 $this->enableIcon(false);
126 if ($this->getContainerObject()->isActiveAdministrationPanel() && !$_SESSION['clipboard']) {
127 $this->tpl->touchBlock("i_1"); // indent main div }
128 $this->tpl->touchBlock("d_2"); // indent main div } #0014913
129 } else {
130 $this->tpl->touchBlock("d_1");
131 }
132
133 parent::insertIconsAndCheckboxes();
134 $this->tpl->setCurrentBlock("icon");
135 $this->tpl->setVariable("ALT_ICON", $lng->txt("icon") . " " . $lng->txt("obj_" . $this->getIconImageType()));
136 $this->tpl->setVariable("SRC_ICON", $icon_file);
137 $this->tpl->parseCurrentBlock();
138 $this->enableIcon(true);
139 } else {
140 parent::insertIconsAndCheckboxes();
141 }
142 }
143}
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
static _getCommands()
get commands
Class ilObjOrgUnitListGUI.
insertIconsAndCheckboxes()
Insert icons and checkboxes.
insertCommonSocialCommands($a_header_actions=false)
no social commands needed in orgunits.
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.
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 $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc