28 function __construct($a_node_id, $a_access_handler, $a_is_portfolio =
false, $a_footer = null)
34 $this->node_id = $a_node_id;
35 $this->access_handler = $a_access_handler;
36 $this->is_portfolio = (bool)$a_is_portfolio;
37 $this->footer = $a_footer;
44 $next_class = $this->ctrl->getNextClass($this);
45 $cmd = $this->ctrl->getCmd();
49 case "ilmailsearchcoursesgui";
50 $ilTabs->setBackTarget($this->lng->txt(
"back"),
51 $this->ctrl->getLinkTarget($this,
"share"));
52 include_once(
'Services/Contact/classes/class.ilMailSearchCoursesGUI.php');
54 $this->ctrl->setReturn($this,
'share');
55 $this->ctrl->forwardCommand($csearch);
60 case "ilmailsearchgroupsgui";
61 $ilTabs->setBackTarget($this->lng->txt(
"back"),
62 $this->ctrl->getLinkTarget($this,
"share"));
63 include_once(
'Services/Contact/classes/class.ilMailSearchGroupsGUI.php');
65 $this->ctrl->setReturn($this,
'share');
66 $this->ctrl->forwardCommand($gsearch);
71 case "ilmailsearchgui";
72 $ilTabs->setBackTarget($this->lng->txt(
"back"),
73 $this->ctrl->getLinkTarget($this,
"share"));
74 include_once(
'Services/Contact/classes/class.ilMailSearchGUI.php');
76 $this->ctrl->setReturn($this,
'share');
77 $this->ctrl->forwardCommand($usearch);
82 case "ilpublicuserprofilegui";
83 $ilTabs->clearTargets();
84 $ilTabs->setBackTarget($this->lng->txt(
"back"),
85 $this->ctrl->getLinkTarget($this,
"share"));
87 include_once(
'./Services/User/classes/class.ilPublicUserProfileGUI.php');
89 $prof->setBackUrl($this->ctrl->getLinkTarget($this,
"share"));
90 $tpl->setContent($prof->getHTML());
114 if(!$this->is_portfolio)
116 $obj_id = $this->access_handler->getTree()->lookupObjectId($this->node_id);
135 $options[
"user"] = $this->lng->txt(
"wsp_set_permission_single_user");
137 include_once
'Modules/Group/classes/class.ilGroupParticipants.php';
141 $options[
"group"] = $this->lng->txt(
"wsp_set_permission_group");
144 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
148 $options[
"course"] = $this->lng->txt(
"wsp_set_permission_course");
153 $options[
"registered"] = $this->lng->txt(
"wsp_set_permission_registered");
156 if($ilSetting->get(
"enable_global_profiles"))
160 $options[
"password"] = $this->lng->txt(
"wsp_set_permission_all_password");
165 $options[
"all"] = $this->lng->txt(
"wsp_set_permission_all");
169 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
171 $actions->setOptions($options);
172 $ilToolbar->addInputItem($actions);
174 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
175 $ilToolbar->addFormButton($this->lng->txt(
"add"),
"addpermissionhandler");
177 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessTableGUI.php";
179 $tpl->setContent($table->getHTML().$this->footer);
187 $this->ctrl->setParameterByClass(
"ilmailsearchgui",
"ref",
"wsp");
188 $this->ctrl->redirectByClass(
"ilmailsearchgui");
191 $this->ctrl->setParameterByClass(
"ilmailsearchgroupsgui",
"ref",
"wsp");
192 $this->ctrl->redirectByClass(
"ilmailsearchgroupsgui");
195 $this->ctrl->setParameterByClass(
"ilmailsearchcoursesgui",
"ref",
"wsp");
196 $this->ctrl->redirectByClass(
"ilmailsearchcoursesgui");
199 $this->
getAccessHandler()->addPermission($this->node_id, self::PERMISSION_REGISTERED);
201 $this->ctrl->redirect($this,
"share");
208 $this->
getAccessHandler()->addPermission($this->node_id, self::PERMISSION_ALL);
210 $this->ctrl->redirect($this,
"share");
222 $this->ctrl->redirect($this,
"share");
227 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
229 $form->setFormAction($this->ctrl->getFormAction($this));
230 $form->setTitle($this->lng->txt(
"wsp_set_permission_all_password"));
234 $form->addItem($password);
236 $form->addCommandButton(
'savepasswordform', $this->lng->txt(
"save"));
237 $form->addCommandButton(
'share', $this->lng->txt(
"cancel"));
250 $tpl->setContent($a_form->getHTML());
256 if($form->checkInput())
259 self::PERMISSION_ALL_PASSWORD, md5($form->getInput(
"password")));
261 $this->ctrl->redirect($this,
"share");
264 $form->setValuesByPost();