4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
5 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
6 require_once
'Services/Utilities/classes/class.ilStr.php';
7 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
50 $this->ctrl = $DIC[
'ilCtrl'];
51 $this->lng = $DIC[
'lng'];
52 $this->
user = $DIC[
'ilUser'];
54 $this->
setId($type.
'table_members');
55 parent::__construct($a_parent_obj,
'showMembers');
58 if($this->context ==
'mail')
61 include_once
"Services/Mail/classes/class.ilMail.php";
63 $this->mailing_allowed = $DIC->rbac()->system()->checkAccess(
'internal_mail',$mail->getMailObjectReferenceId());
66 $this->lng->loadLanguageModule(
'crs');
67 $this->lng->loadLanguageModule(
'buddysystem');
68 $this->parentObject = $a_parent_obj;
72 $mode[
"checkbox"] =
'search_crs';
73 $mode[
"short"] =
'crs';
74 $mode[
"long"] =
'course';
75 $mode[
"lng_type"] = $this->lng->txt(
'course');
76 $mode[
"view"] =
"crs_members";
78 else if ($type ==
'grp')
80 $mode[
"checkbox"] =
'search_grp';
81 $mode[
"short"] =
'grp';
82 $mode[
"long"] =
'group';
83 $mode[
"lng_type"] = $this->lng->txt(
'group');
84 $mode[
"view"] =
"grp_members";
86 $this->
setTitle($this->lng->txt(
'members'));
88 $this->ctrl->setParameter($a_parent_obj,
'view',
$mode[
'view']);
89 if (
$_GET[
'ref'] !=
'')
90 $this->ctrl->setParameter($a_parent_obj,
'ref',
$_GET[
'ref']);
92 $this->ctrl->setParameter($a_parent_obj, $mode[
"checkbox"], implode(
',',
$_POST[$mode[
"checkbox"]]));
94 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
95 $this->ctrl->clearParameters($a_parent_obj);
97 $this->
setRowTemplate(
'tpl.mail_search_courses_members_row.html',
'Services/Contact');
101 $this->
addColumn($this->lng->txt(
'login'),
'members_login',
'22%');
102 $this->
addColumn($this->lng->txt(
'name'),
'members_name',
'22%');
103 $this->
addColumn($this->lng->txt($mode[
'long']),
'members_crs_grp',
'22%');
106 $this->
addColumn($this->lng->txt(
'buddy_tbl_filter_state'),
'status',
'23%');
108 $this->
addColumn($this->lng->txt(
'actions'),
'',
'10%');
110 if($this->context ==
"mail")
112 if($this->mailing_allowed)
121 $this->lng->loadLanguageModule(
"wsp");
122 $this->
addMultiCommand(
'share', $this->lng->txt(
"wsp_share_with_members"));
124 $this->lng->loadLanguageModule(
'buddysystem');
138 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
140 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
141 $current_selection_list->setId(
"act_".md5($a_set[
'members_id'].
'::'.$a_set[
'search_' . $this->mode[
'short']]));
143 $this->ctrl->setParameter($this->parentObject,
'search_members', $a_set[
'members_id']);
144 $this->ctrl->setParameter($this->parentObject,
'search_' . $this->mode[
'short'],
145 is_array($_REQUEST[
'search_' . $this->mode[
'short']]) ?
146 implode(
',', array_filter(array_map(
'intval', $_REQUEST[
'search_' . $this->mode[
'short']]))) :
147 (
int)$_REQUEST[
'search_' . $this->mode[
'short']]
149 $this->ctrl->setParameter($this->parentObject,
'view', $this->mode[
'view']);
152 if($this->context ==
"mail")
154 if($this->mailing_allowed)
156 $current_selection_list->addItem($this->lng->txt(
"mail_member"),
'', $this->ctrl->getLinkTarget($this->parentObject,
"mail"));
161 $current_selection_list->addItem($this->lng->txt(
"wsp_share_with_members"),
'', $this->ctrl->getLinkTarget($this->parentObject,
"share"));
168 $a_set[
'members_id'] != $this->
user->getId() &&
169 $relation->isUnlinked() &&
173 $this->ctrl->setParameterByClass(
'ilBuddySystemGUI',
'user_id', $a_set[
'members_id']);
174 $current_selection_list->addItem($this->lng->txt(
'buddy_bs_btn_txt_unlinked_a'),
'', $this->ctrl->getLinkTargetByClass(
'ilBuddySystemGUI',
'request'));
178 if($current_selection_list->getItems())
180 $action_html = $current_selection_list->getHTML();
182 $this->tpl->setVariable(strtoupper(
'CURRENT_ACTION_LIST'), $action_html);
184 foreach($a_set as $key => $value)
186 $this->tpl->setVariable(strtoupper($key), $value);
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
__construct($a_parent_obj, $type='crs', $context='mail')
Constructor.
static getInstanceByGlobalUser()
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
This class handles base functions for mail handling.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static _lookupPref($a_usr_id, $a_keyword)
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
static yn2tf($a_yn)
convert "y"/"n" to true/false
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.