|
|
|
@ -709,6 +709,15 @@ class SocialManager extends UserManager |
|
|
|
|
$total_invitations = $number_of_new_messages_of_friend + $group_pending_invitations; |
|
|
|
|
$total_invitations = (!empty($total_invitations) ? Display::badge($total_invitations) : ''); |
|
|
|
|
|
|
|
|
|
$filesIcon = Display::return_icon('sn-files.png', get_lang('MyFiles'), '', ICON_SIZE_SMALL); |
|
|
|
|
$friendsIcon = Display::return_icon('sn-friends.png',get_lang('Friends'),'',ICON_SIZE_SMALL); |
|
|
|
|
$groupsIcon = Display::return_icon('sn-groups.png', get_lang('SocialGroups'), '', ICON_SIZE_SMALL); |
|
|
|
|
$homeIcon = Display::return_icon('sn-home.png', get_lang('Home'), '', ICON_SIZE_SMALL); |
|
|
|
|
$invitationsIcon = Display::return_icon('sn-invitations.png', get_lang('Invitations'), '', ICON_SIZE_SMALL); |
|
|
|
|
$messagesIcon = Display::return_icon('sn-message.png', get_lang('Messages'), '', ICON_SIZE_SMALL); |
|
|
|
|
$sharedProfileIcon = Display::return_icon('sn-profile.png', get_lang('ViewMySharedProfile')); |
|
|
|
|
$searchIcon = Display::return_icon('sn-search.png', get_lang('Search'), '', ICON_SIZE_SMALL); |
|
|
|
|
|
|
|
|
|
$html = ''; |
|
|
|
|
$active = null; |
|
|
|
|
if (!in_array($show, array('shared_profile', 'groups', 'group_edit', 'member_list', 'waiting_list', 'invite_friends'))) { |
|
|
|
@ -717,29 +726,29 @@ class SocialManager extends UserManager |
|
|
|
|
$html .= '<div class="panel-body">'; |
|
|
|
|
$html .= '<ul class="nav nav-pills nav-stacked">'; |
|
|
|
|
$active = $show == 'home' ? 'active' : null; |
|
|
|
|
$html .= '<li class="home-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/home.php">'.Display::return_icon('social-home.png',get_lang('Home'),'',ICON_SIZE_SMALL).' '.get_lang('Home').'</a></li>'; |
|
|
|
|
$html .= '<li class="home-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/home.php">'.$homeIcon.' '.get_lang('Home').'</a></li>'; |
|
|
|
|
$active = $show == 'messages' ? 'active' : null; |
|
|
|
|
$html .= '<li class="messages-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social">'.Display::return_icon('social-message.png',get_lang('Messages'),'',ICON_SIZE_SMALL).' '.get_lang('Messages').$count_unread_message.'</a></li>'; |
|
|
|
|
$html .= '<li class="messages-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social">'.$messagesIcon.' '.get_lang('Messages').$count_unread_message.'</a></li>'; |
|
|
|
|
|
|
|
|
|
//Invitations |
|
|
|
|
$active = $show == 'invitations' ? 'active' : null; |
|
|
|
|
$html .= '<li class="invitations-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.Display::return_icon('social-invitations.png',get_lang('Invitations'),'',ICON_SIZE_SMALL).' '.get_lang('Invitations').$total_invitations.'</a></li>'; |
|
|
|
|
$html .= '<li class="invitations-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.$invitationsIcon.' '.get_lang('Invitations').$total_invitations.'</a></li>'; |
|
|
|
|
|
|
|
|
|
//Shared profile and groups |
|
|
|
|
$active = $show == 'shared_profile' ? 'active' : null; |
|
|
|
|
$html .= '<li class="shared-profile-icon'.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile.php">'.Display::return_icon('social-profile.png',get_lang('ViewMySharedProfile'),'',ICON_SIZE_SMALL).' '.get_lang('ViewMySharedProfile').'</a></li>'; |
|
|
|
|
$html .= '<li class="shared-profile-icon'.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile.php">'.$sharedProfileIcon.' '.get_lang('ViewMySharedProfile').'</a></li>'; |
|
|
|
|
$active = $show == 'friends' ? 'active' : null; |
|
|
|
|
$html .= '<li class="friends-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/friends.php">'.Display::return_icon('social-friends.png',get_lang('Friends'),'',ICON_SIZE_SMALL).' '.get_lang('Friends').'</a></li>'; |
|
|
|
|
$html .= '<li class="friends-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/friends.php">'.$friendsIcon.' '.get_lang('Friends').'</a></li>'; |
|
|
|
|
$active = $show == 'browse_groups' ? 'active' : null; |
|
|
|
|
$html .= '<li class="browse-groups-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/groups.php">'.Display::return_icon('social-groups.png',get_lang('SocialGroups'),'',ICON_SIZE_SMALL).' '.get_lang('SocialGroups').'</a></li>'; |
|
|
|
|
$html .= '<li class="browse-groups-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/groups.php">'.$groupsIcon.' '.get_lang('SocialGroups').'</a></li>'; |
|
|
|
|
|
|
|
|
|
//Search users |
|
|
|
|
$active = $show == 'search' ? 'active' : null; |
|
|
|
|
$html .= '<li class="search-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/search.php">'.Display::return_icon('social-search.png',get_lang('Search'),'',ICON_SIZE_SMALL).' '.get_lang('Search').'</a></li>'; |
|
|
|
|
$html .= '<li class="search-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/search.php">'.$searchIcon.' '.get_lang('Search').'</a></li>'; |
|
|
|
|
|
|
|
|
|
//My files |
|
|
|
|
$active = $show == 'myfiles' ? 'active' : null; |
|
|
|
|
$html .= '<li class="myfiles-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/myfiles.php">'.Display::return_icon('social-files.png',get_lang('MyFiles'),'',ICON_SIZE_SMALL).' '.get_lang('MyFiles').'</span></a></li>'; |
|
|
|
|
$html .= '<li class="myfiles-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/myfiles.php">'.$filesIcon.' '.get_lang('MyFiles').'</span></a></li>'; |
|
|
|
|
$html .='</ul></div></div>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -758,18 +767,18 @@ class SocialManager extends UserManager |
|
|
|
|
|
|
|
|
|
// My own profile |
|
|
|
|
if ($show_full_profile && $user_id == intval(api_get_user_id())) { |
|
|
|
|
$html .= '<li class="home-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/home.php">'.Display::return_icon('social-home.png',get_lang('Home'),'',ICON_SIZE_SMALL).' '.get_lang('Home').'</a></li> |
|
|
|
|
<li class="messages-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social">'.Display::return_icon('social-message.png',get_lang('Messages'),'',ICON_SIZE_SMALL).' '.get_lang('Messages').$count_unread_message.'</a></li>'; |
|
|
|
|
$html .= '<li class="home-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/home.php">'.$homeIcon.' '.get_lang('Home').'</a></li> |
|
|
|
|
<li class="messages-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social">'.$messagesIcon.' '.get_lang('Messages').$count_unread_message.'</a></li>'; |
|
|
|
|
$active = $show == 'invitations' ? 'active' : null; |
|
|
|
|
$html .= '<li class="invitations-icon'.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.Display::return_icon('social-invitations.png',get_lang('Invitations'),'',ICON_SIZE_SMALL).' '.get_lang('Invitations').$total_invitations.'</a></li>'; |
|
|
|
|
$html .= '<li class="invitations-icon'.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.$invitationsIcon.' '.get_lang('Invitations').$total_invitations.'</a></li>'; |
|
|
|
|
|
|
|
|
|
$html .= '<li class="shared-profile-icon active"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile.php">'.Display::return_icon('social-profile.png',get_lang('ViewMySharedProfile'),'',ICON_SIZE_SMALL).' '.get_lang('ViewMySharedProfile').'</a></li> |
|
|
|
|
<li class="friends-icon"><a href="'.api_get_path(WEB_CODE_PATH).'social/friends.php">'.Display::return_icon('social-friends.png',get_lang('Friends'),'',ICON_SIZE_SMALL).' '.get_lang('Friends').'</a></li> |
|
|
|
|
<li class="browse-groups-icon"><a href="'.api_get_path(WEB_CODE_PATH).'social/groups.php">'.Display::return_icon('social-groups.png',get_lang('SocialGroups'),'',ICON_SIZE_SMALL).' '.get_lang('SocialGroups').'</a></li>'; |
|
|
|
|
$html .= '<li class="shared-profile-icon active"><a href="'.api_get_path(WEB_CODE_PATH).'social/profile.php">'.$sharedProfileIcon.' '.get_lang('ViewMySharedProfile').'</a></li> |
|
|
|
|
<li class="friends-icon"><a href="'.api_get_path(WEB_CODE_PATH).'social/friends.php">'.$friendsIcon.' '.get_lang('Friends').'</a></li> |
|
|
|
|
<li class="browse-groups-icon"><a href="'.api_get_path(WEB_CODE_PATH).'social/groups.php">'.$groupsIcon.' '.get_lang('SocialGroups').'</a></li>'; |
|
|
|
|
$active = $show == 'search' ? 'active' : null; |
|
|
|
|
$html .= '<li class="search-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/search.php">'.Display::return_icon('social-search.png',get_lang('Search'),'',ICON_SIZE_SMALL).' '.get_lang('Search').'</a></li>'; |
|
|
|
|
$html .= '<li class="search-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/search.php">'.$searchIcon.' '.get_lang('Search').'</a></li>'; |
|
|
|
|
$active = $show == 'myfiles' ? 'active' : null; |
|
|
|
|
$html .= '<li class="myfiles-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/myfiles.php">'.Display::return_icon('social-files.png',get_lang('MyFiles'),'',ICON_SIZE_SMALL).' '.get_lang('MyFiles').'</a></li>'; |
|
|
|
|
$html .= '<li class="myfiles-icon '.$active.'"><a href="'.api_get_path(WEB_CODE_PATH).'social/myfiles.php">'.$filesIcon.' '.get_lang('MyFiles').'</a></li>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// My friend profile. |
|
|
|
|