4 require_once
'Services/User/interfaces/interface.ilGalleryUsers.php';
5 require_once
'Services/User/classes/class.ilUserUtil.php';
6 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
7 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
8 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystemLinkButton.php';
9 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystemRelation.php';
10 require_once
'Services/Contact/BuddySystem/classes/states/class.ilBuddySystemRelationStateFactory.php';
11 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
81 $next_class = $this->ctrl->getNextClass();
82 $cmd = $this->ctrl->getCmd(
'view');
86 case 'ilpublicuserprofilegui':
87 require_once
'Services/User/classes/class.ilPublicUserProfileGUI.php';
89 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
'view'));
90 $this->ctrl->forwardCommand($profile_gui);
109 $template = $this->buildHTML($this->
object->getGalleryUsers());
110 $this->tpl->setContent($template->get());
121 $this->
user->getId() != $user->
getId() &&
122 !$this->
user->isAnonymous() &&
127 $tpl->
setVariable(
'BUDDY_HTML', $button->getHtml());
135 protected function buildHTML($users)
138 $tpl =
new ilTemplate(
'tpl.users_gallery.html',
true,
true,
'Services/User');
140 require_once
'Services/UIComponent/Panel/classes/class.ilPanelGUI.php';
142 $panel->setBody($this->lng->txt(
'no_gallery_users_available'));
143 $tpl->setVariable(
'NO_ENTRIES_HTML', json_encode($panel->getHTML()));
147 $tpl->setVariable(
'NO_GALLERY_USERS', $panel->getHTML());
151 require_once
'Services/UIComponent/Panel/classes/class.ilPanelGUI.php';
153 $panel->setBody($this->lng->txt(
'no_gallery_users_available'));
154 $tpl->setVariable(
'NO_ENTRIES_HTML', json_encode($panel->getHTML()));
156 foreach($users as $user_data)
161 $user = $user_data[
'user'];
163 if($user_data[
'public_profile'])
165 $tpl->setCurrentBlock(
'linked_image');
166 $this->ctrl->setParameterByClass(
'ilpublicuserprofilegui',
'user',
$user->getId());
167 $profile_target = $this->ctrl->getLinkTargetByClass(
'ilpublicuserprofilegui',
'getHTML');
168 $tpl->setVariable(
'LINK_PROFILE', $profile_target);
169 $tpl->setVariable(
'PUBLIC_NAME', $user_data[
'public_name']);
173 $tpl->setCurrentBlock(
'unlinked_image');
174 $tpl->setVariable(
'PUBLIC_NAME',
$user->getLogin());
176 $tpl->setVariable(
'SRC_USR_IMAGE',
$user->getPersonalPicturePath(
'small'));
177 $tpl->parseCurrentBlock();
179 $tpl->setCurrentBlock(
'user');
181 $tpl->setVariable(
'BUDDYLIST_STATUS', get_class($buddylist->getRelationByUserId(
$user->getId())->getState()));
182 $tpl->setVariable(
'USER_CC_CLASS', $this->
object->getUserCssClass());
183 $tpl->setVariable(
'USER_ID',
$user->getId());
185 $tpl->parseCurrentBlock();
static getInstanceByGlobalUser()
renderLinkButton(ilTemplate $tpl, ilObjUser $user)
ilUsersGalleryGUI: ilPublicUserProfileGUI ilUsersGalleryGUI: ilCourseMembershipGUI, ilGroupMembershipGUI
GUI class for public user profile presentation.
setVariable($variable, $value='')
Sets a variable value.
getId()
get object id public
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
view()
Displays the participants gallery.
Interface ilGalleryUsers.
static getInstance()
Get instance.
Create new PHPExcel object
obj_idprivate