ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilAvailableRolesStatusTableGUI.php
Go to the documentation of this file.
1<?php
2include_once ('./Services/Table/classes/class.ilTable2GUI.php');
3
14{
18 public function __construct($a_parent_obj,$a_parent_cmd)
19 {
20 global $lng;
21
22 parent::__construct($a_parent_obj,$a_parent_cmd);
23
24 $this->setId('available_roles'.$this->parent_obj->user->getId());
25 $this->setEnableHeader(true);
26 $this->disable('numinfo');
27 $this->setLimit(100);
28 $this->setRowTemplate("tpl.available_roles_status_row.html", "Services/AccessControl");
29
30 $this->addColumn("","status","5%");
31 $this->addColumn($lng->txt("role"),"role", "32%");
32 $this->addColumn(str_replace(" ","&nbsp;",$lng->txt("info_permission_source")),"effective_from", "32%");
33 $this->addColumn(str_replace(" ","&nbsp;",$lng->txt("info_permission_origin")),"original_position");
34
35 include_once ('./Services/Link/classes/class.ilLink.php');
36 }
37
41 protected function fillRow($a_set)
42 {
43 global $lng, $ilCtrl;
44
45 if($a_set["img"] == ilObjectPermissionStatusGUI::IMG_OK)
46 {
47 $img_path = ilUtil::getImagePath("icon_ok.svg");
48 $img_info = $lng->txt("info_assigned");
49 }
50 else
51 {
52 $img_path = ilUtil::getImagePath("icon_not_ok.svg");
53 $img_info = $lng->txt("info_not_assigned");
54 }
55 $this->tpl->setVariable("IMG_PATH", $img_path);
56 $this->tpl->setVariable("IMG_INFO", $img_info);
57
58 $link = $ilCtrl->getLinkTargetByClass(array(ilpermissiongui), 'perm', '', true);
59 $this->tpl->setVariable("ROLE_LINK", $link);
60 $this->tpl->setVariable("TXT_ROLE", $a_set["role"]);
61
62 if($a_set["effective_from"] != "")
63 {
64 $this->tpl->setCurrentBlock("effective_from");
65 $this->tpl->setVariable("EFFECTIVE_FROM_LINK", ilLink::_getLink($a_set["effective_from_ref_id"]));
66 $this->tpl->setVariable("TXT_EFFECTIVE_FROM", $a_set["effective_from"]);
67 $this->tpl->parseCurrentBlock();
68 }
69
70 if($a_set["original_position_ref_id"] !== false)
71 {
72 $this->tpl->setCurrentBlock("original_position_with_link");
73 $this->tpl->setVariable("TXT_ORIGINAL_POSITION_WITH_LINK", $a_set["original_position"]);
74 $this->tpl->setVariable("ORIGINAL_POSITION_LINK", ilLink::_getLink($a_set["original_position_ref_id"]));
75 $this->tpl->parseCurrentBlock();
76 }
77 else
78 {
79 $this->tpl->setVariable("TXT_ORIGINAL_POSITION", $a_set["original_position"]);
80 }
81
82 }
83}
84
Table for Available Roles in Permission > Permission of User.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
setId($a_val)
Set id.
disable($a_module_name)
diesables particular modules of table
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40