ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 $DIC;
23 $tpl = $DIC['tpl'];
24 parent::__construct();
25 $this->tpl = $tpl;
26 //$this->enableComments(false, false);
27 }
28
29
33 function init() {
34 $this->static_link_enabled = true;
35 $this->delete_enabled = true;
36 $this->cut_enabled = true;
37 $this->info_screen_enabled = true;
38 $this->copy_enabled = false;
39 $this->subscribe_enabled = false;
40 $this->link_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($a_header_actions = false) {
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 $DIC;
96 $lng = $DIC['lng'];
97 $ilias = $DIC['ilias'];
98 // FSX removed $this->getCheckboxStatus() in if-Statement: 0014726
99 if (!$ilias->getSetting('custom_icons')) {
100 parent::insertIconsAndCheckboxes();
101
102 return;
103 }
104 $icons_cache = ilObjOrgUnit::getIconsCache();
105 if (isset($icons_cache[$this->obj_id])) {
106 $icon_file = $icons_cache[$this->obj_id];
107 // icon link
108 if (!$this->default_command OR (!$this->getCommandsStatus() AND !$this->restrict_to_goto)) {
109 } else {
110 $this->tpl->setCurrentBlock("icon_link_s");
111
112 if ($this->default_command["frame"] != "") {
113 $this->tpl->setVariable("ICON_TAR", "target='" . $this->default_command["frame"] . "'");
114 }
115
116 $this->tpl->setVariable("ICON_HREF", $this->default_command["link"]);
117 $this->tpl->parseCurrentBlock();
118 $this->tpl->touchBlock("icon_link_e");
119 }
120 $this->enableIcon(false);
121 if($this->getContainerObject()->isActiveAdministrationPanel() && !$_SESSION['clipboard'])
122 {
123 $this->tpl->touchBlock("i_1"); // indent main div }
124 $this->tpl->touchBlock("d_2"); // indent main div } #0014913
125 }else{
126 $this->tpl->touchBlock("d_1");
127 }
128
129 parent::insertIconsAndCheckboxes();
130 $this->tpl->setCurrentBlock("icon");
131 $this->tpl->setVariable("ALT_ICON", $lng->txt("icon") . " " . $lng->txt("obj_" . $this->getIconImageType()));
132 $this->tpl->setVariable("SRC_ICON", $icon_file);
133 $this->tpl->parseCurrentBlock();
134 $this->enableIcon(true);
135 } else {
136 parent::insertIconsAndCheckboxes();
137 }
138 }
139}
140
141?>
$_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 $lng
Definition: privfeed.php:17
global $DIC