12 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
36 if($this->context ==
"mail")
39 include_once
"Services/Mail/classes/class.ilMail.php";
41 $this->mailing_allowed = $rbacsystem->checkAccess(
'internal_mail',$mail->getMailObjectReferenceId());
45 $lng->loadLanguageModule(
'crs');
46 $this->parentObject = $a_parent_obj;
50 $mode[
"checkbox"] =
'search_crs';
51 $mode[
"short"] =
'crs';
52 $mode[
"long"] =
'course';
53 $mode[
"lng_type"] = $lng->txt(
'course');
54 $mode[
"view"] =
"crs_members";
55 $mode[
"tableprefix"] =
"crstable_members";
57 else if ($type ==
'grp')
59 $mode[
"checkbox"] =
'search_grp';
60 $mode[
"short"] =
'grp';
61 $mode[
"long"] =
'group';
62 $mode[
"lng_type"] = $lng->txt(
'group');
63 $mode[
"view"] =
"grp_members";
64 $mode[
"tableprefix"] =
"grptable_members";
66 $this->
setTitle($lng->txt(
'members'));
68 $ilCtrl->setParameter($a_parent_obj,
'view',
$mode[
'view']);
69 if (
$_GET[
'ref'] !=
'')
70 $ilCtrl->setParameter($a_parent_obj,
'ref',
$_GET[
'ref']);
72 $ilCtrl->setParameter($a_parent_obj, $mode[
"checkbox"], implode(
',',
$_POST[$mode[
"checkbox"]]));
75 $ilCtrl->clearParameters($a_parent_obj);
79 $this->
setRowTemplate(
'tpl.mail_search_courses_members_row.html',
'Services/Contact');
83 $this->
addColumn($lng->txt(
'login'),
'members_login',
'22%');
84 $this->
addColumn($lng->txt(
'name'),
'members_name',
'22%');
85 $this->
addColumn($lng->txt($mode[
'long']),
'members_crs_grp',
'22%');
86 $this->
addColumn($lng->txt(
'mail_in_addressbook'),
'members_in_addressbook',
'23%');
87 $this->
addColumn($lng->txt(
'actions'),
'',
'10%');
89 if($this->context ==
"mail")
91 if ($this->mailing_allowed)
93 $this->
addMultiCommand(
'adoptMembers', $lng->txt(
"mail_into_addressbook"));
97 $lng->loadLanguageModule(
"wsp");
114 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
116 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
117 $current_selection_list->setId(
"act_".md5($a_set[
'members_id'].
'::'.$a_set[
'search_' . $this->mode[
'short']]));
119 $ilCtrl->setParameter($this->parentObject,
'search_members', $a_set[
'members_id']);
120 $ilCtrl->setParameter($this->parentObject,
'search_' . $this->mode[
'short'],
121 is_array(
$_REQUEST[
'search_' . $this->mode[
'short']]) ?
122 implode(
',', array_filter(array_map(
'intval',
$_REQUEST[
'search_' . $this->mode[
'short']]))) :
123 (
int)
$_REQUEST[
'search_' . $this->mode[
'short']]
125 $ilCtrl->setParameter($this->parentObject,
'view', $this->mode[
'view']);
127 if($this->context ==
"mail")
129 if ($this->mailing_allowed)
130 $current_selection_list->addItem($this->lng->txt(
"mail_member"),
'', $ilCtrl->getLinkTarget($this->parentObject,
"mail"));
131 $current_selection_list->addItem($this->lng->txt(
"mail_into_addressbook"),
'', $ilCtrl->getLinkTarget($this->parentObject,
"adoptMembers"));
135 $current_selection_list->addItem($this->lng->txt(
"wsp_share_with_members"),
'', $ilCtrl->getLinkTarget($this->parentObject,
"share"));
138 $this->tpl->setVariable(strtoupper(
'CURRENT_ACTION_LIST'), $current_selection_list->getHTML());
140 foreach ($a_set as $key => $value)
142 $this->tpl->setVariable(strtoupper($key), $value);