ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.iliLinkMembersTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once 'Services/Table/classes/class.ilTable2GUI.php';
5
14{
15 protected $type = 'show';
16
17 public function __construct($a_parent_obj, $a_data, $a_type, $a_cmd, $a_default_form_action)
18 {
19 global $ilCtrl, $lng, $ilAccess, $lng;
20
21 parent::__construct($a_parent_obj, $a_cmd);
22
23 $this->type = $a_type;
24 $this->setData($a_data);
25
26 if($this->type == 'show')
27 {
28 if($ilAccess->checkAccess('write', '', $a_parent_obj->object->getRefId()))
29 {
30 $this->addColumn('', 'f', '1');
31 if(is_array($a_data) && count($a_data))
32 {
33 $this->addMultiCommand('removeMember', $lng->txt('remove'));
34 $this->addMultiCommand('changeMember', $lng->txt('change'));
35 $this->enable('select_all');
36 $this->setSelectAllCheckbox('user_id[]');
37 }
38 }
39
40 $this->addColumn($lng->txt('username'), 'login', '20%');
41 $this->addColumn($lng->txt('firstname'), 'firstname', '15%');
42 $this->addColumn($lng->txt('lastname'), 'username', '15%');
43 $this->addColumn($lng->txt('ilinc_coursemember_status'), 'ilinc_coursemember_status', '20%');
44 $this->addColumn($lng->txt('role'), 'role', '20%');
45 $this->addColumn($lng->txt('grp_options'), 'functions', '10%');
46
47 $this->setRowTemplate('tpl.icrs_members_row.html', 'Modules/ILinc');
48 }
49 else if($this->type == 'change')
50 {
51 $this->addColumn($lng->txt('username'), 'login', '20%');
52 $this->addColumn($lng->txt('firstname'), 'firstname', '15%');
53 $this->addColumn($lng->txt('lastname'), 'username', '15%');
54 $this->addColumn($lng->txt('ilinc_coursemember_status'), 'ilinc_coursemember_status', '20%');
55 $this->addColumn($lng->txt('role'), 'role', '30%');
56
57 $this->addCommandButton('members', $this->lng->txt('back'));
58 if(is_array($a_data) && count($a_data))
59 {
60 $this->addCommandButton('updateMemberStatus', $this->lng->txt('confirm'));
61 }
62
63 $this->setRowTemplate('tpl.icrs_members_change_row.html', 'Modules/ILinc');
64 $this->setLimit(32000);
65 }
66
67 $this->enable('sort');
68 $this->enable('header');
69 $this->enable('numinfo');
70
71 $this->setPrefix('members');
72 $this->setFormName('members');
73
74 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_default_form_action));
75 }
76}
77?>
Class ilTable2GUI.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
setPrefix($a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setFormName($a_formname)
Set Form name.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setLimit($a_limit=0, $a_default_limit=0)
set max.
enable($a_module_name)
enables particular modules of table
__construct($a_parent_obj, $a_data, $a_type, $a_cmd, $a_default_form_action)
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40