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';
49 $this->ctrl = $DIC[
'ilCtrl'];
50 $this->lng = $DIC[
'lng'];
51 $this->
user = $DIC[
'ilUser'];
53 $tableId =
$type .
'_cml_' . implode(
'_', (
array) $contextObjects);
54 $this->
setId($tableId);
55 parent::__construct($a_parent_obj,
'showMembers');
58 if ($this->context ==
'mail') {
60 include_once
"Services/Mail/classes/class.ilMail.php";
62 $this->mailing_allowed = $DIC->rbac()->system()->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId());
68 $this->lng->loadLanguageModule(
'crs');
69 $this->lng->loadLanguageModule(
'buddysystem');
73 $mode[
"checkbox"] =
'search_crs';
74 $mode[
"short"] =
'crs';
75 $mode[
"long"] =
'course';
76 $mode[
"lng_type"] = $this->lng->txt(
'course');
77 $mode[
"view"] =
"crs_members";
78 } elseif (
$type ==
'grp') {
79 $mode[
"checkbox"] =
'search_grp';
80 $mode[
"short"] =
'grp';
81 $mode[
"long"] =
'group';
82 $mode[
"lng_type"] = $this->lng->txt(
'group');
83 $mode[
"view"] =
"grp_members";
85 $this->
setTitle($this->lng->txt(
'members'));
87 $this->ctrl->setParameter($a_parent_obj,
'view',
$mode[
'view']);
88 if (
$_GET[
'ref'] !=
'') {
89 $this->ctrl->setParameter($a_parent_obj,
'ref',
$_GET[
'ref']);
92 $this->ctrl->setParameter($a_parent_obj, $mode[
"checkbox"], implode(
',',
$_POST[$mode[
"checkbox"]]));
95 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
98 $this->
setRowTemplate(
'tpl.mail_search_courses_members_row.html',
'Services/Contact');
102 $this->
addColumn($this->lng->txt(
'login'),
'members_login',
'22%');
103 $this->
addColumn($this->lng->txt(
'name'),
'members_name',
'22%');
104 $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") {
111 if ($this->mailing_allowed) {
117 $this->lng->loadLanguageModule(
"wsp");
118 $this->
addMultiCommand(
'share', $this->lng->txt(
"wsp_share_with_members"));
120 $this->lng->loadLanguageModule(
'buddysystem');
133 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
135 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
136 $current_selection_list->setId(
"act_" . md5($a_set[
'members_id'] .
'::' . $a_set[
'search_' . $this->mode[
'short']]));
138 $this->ctrl->setParameter($this->parent_obj,
'search_members', $a_set[
'members_id']);
139 $this->ctrl->setParameter(
141 'search_' . $this->mode[
'short'],
142 is_array($_REQUEST[
'search_' . $this->mode[
'short']]) ?
143 implode(
',', array_filter(array_map(
'intval', $_REQUEST[
'search_' . $this->mode[
'short']]))) :
146 $this->ctrl->setParameter($this->parent_obj,
'view', $this->mode[
'view']);
149 if ($this->context ==
"mail") {
150 if ($this->mailing_allowed) {
151 $current_selection_list->addItem($this->lng->txt(
"mail_member"),
'', $this->ctrl->getLinkTarget($this->parent_obj,
"mail"));
154 $current_selection_list->addItem($this->lng->txt(
"wsp_share_with_members"),
'', $this->ctrl->getLinkTarget($this->parent_obj,
"share"));
160 $a_set[
'members_id'] != $this->
user->getId() &&
161 $relation->isUnlinked() &&
164 $this->ctrl->setParameterByClass(
'ilBuddySystemGUI',
'user_id', $a_set[
'members_id']);
165 $current_selection_list->addItem($this->lng->txt(
'buddy_bs_btn_txt_unlinked_a'),
'', $this->ctrl->getLinkTargetByClass(
'ilBuddySystemGUI',
'request'));
169 if ($current_selection_list->getItems()) {
170 $action_html = $current_selection_list->getHTML();
172 $this->tpl->setVariable(strtoupper(
'CURRENT_ACTION_LIST'), $action_html);
174 foreach ($a_set as
$key => $value) {
175 $this->tpl->setVariable(strtoupper(
$key), $value);
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static getInstanceByGlobalUser()
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
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.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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)
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.
__construct($a_parent_obj, $type='crs', $context='mail', $contextObjects)
Constructor.
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