Adding lang vars, MySocialGroup CreateASocialGroup, etc

skala
Julio Montoya 14 years ago
parent d724de9662
commit 17577e9cd7
  1. 21
      main/inc/lib/social.lib.php
  2. 25
      main/social/home.php
  3. 6
      main/social/usergroups.php

@ -550,11 +550,11 @@ class SocialManager extends UserManager {
// Everybody can create groups
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
$create_group_item = '<li class="social-menu-sub-level"><a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateAgroup'),array('hspace'=>'6','style'=>'float:left')).'<span class="'.($show=='group_add'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('CreateAgroup').'</span></a></li>';
$create_group_item = '<li class="social-menu-sub-level"><a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).'<span class="'.($show=='group_add'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('CreateASocialGroup').'</span></a></li>';
} else {
// Only admins and teachers can create groups
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<li class="social-menu-sub-level"><a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateAgroup'),array('hspace'=>'6','style'=>'float:left')).'<span class="'.($show=='group_add'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('CreateAgroup').'</span></a></li>';
$create_group_item = '<li class="social-menu-sub-level"><a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).'<span class="'.($show=='group_add'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('CreateASocialGroup').'</span></a></li>';
}
}
@ -626,23 +626,30 @@ class SocialManager extends UserManager {
//Shared profile
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('ViewMySharedProfile').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="'.($show=='friends'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Friends').'</span></a></li>
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('Groups'),array('hspace'=>'6')).'<span class="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Groups').'</span></a></li>';
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('Groups'),array('hspace'=>'6')).'<span class="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('SocialGroups').'</span></a></li>';
//Show groups
if (in_array($show,$show_groups)) {
echo $create_group_item;
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true' || api_is_platform_admin()) {
echo '<li><ul>';
echo '<li class="social-menu-sub-level" style="background:none;padding:0px"><a href="'.api_get_path(WEB_PATH).'main/social/groups.php?view=mygroups">'.Display::return_icon('group.png',get_lang('MyGroups'),array('hspace'=>'6')).'<span class="'.($show=='mygroups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyGroups').'</span></a></li>';
echo '<li class="social-menu-sub-level" style="background:none;padding:0px"><a href="'.api_get_path(WEB_PATH).'main/social/groups.php?view=mygroups">'.Display::return_icon('group.png',get_lang('MySocialGroups'),array('hspace'=>'6')).'<span class="'.($show=='mygroups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MySocialGroups').'</span></a></li>';
echo '</ul></li>';
}
}
//Search users and groups
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
//Groups
$group_class = 'social-menu-text4';
if ($show == 'classes') {
$group_class = 'social-menu-text-active';
}
echo Display::tag('li', Display::return_icon('group.png',get_lang('MyGroups'),array('hspace'=>'6')).Display::url(Display::tag('span',get_lang('MyGroups'),array('class'=>$group_class)),api_get_path(WEB_PATH).'main/social/usergroups.php'));
echo Display::tag('li', Display::return_icon('group.png',get_lang('Groups'),array('hspace'=>'6')).Display::url(get_lang('MyClasses'),api_get_path(WEB_PATH).'main/social/usergroups.php'));
//Search users and groups
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
//My files
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase_small.png',get_lang('MyFiles'),array('hspace'=>'6')).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
echo'</ul>

@ -85,31 +85,24 @@ echo '<div id="social-content">';
echo '<div class="social-box-container1">
<div>'.Display::return_icon('boxmygroups.jpg',get_lang('Profile')).'</div>
<div class="social-box-content1">';
echo '<div>'.$image.'</div>';
echo '<div><p><strong>'.get_lang('Name').'</strong><br /><span class="social-groups-text4">'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</span></p></div>
<div><p><strong>'.get_lang('Email').'</strong><br /><span class="social-groups-text4">'.($user_info['email']?$user_info['email']:'').'</span></p></div>
<div class="box_description_group_actions" ><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.Display::return_icon('profile_edit.png', get_lang('EditProfile'), array('hspace'=>'6')).get_lang('EditProfile').$url_close.'</a></div>
</div>
</div>';
if (count($user_online_list) > 0) {
echo '<div class="social-box-container1">
<div>'.Display::return_icon('boxmygroups.jpg',get_lang('UsersOnline')).'</div>
<div class="social-box-content1">
<div><p class="groupTex3"><strong>'.get_lang('UsersOnline').'</strong> </p></div>
<div>';
echo '<center>'.SocialManager::display_user_list($user_online_list).'</center>';
echo '</div>
</div>
</div>';
echo '<div class="social-box-container1">
<div>'.Display::return_icon('boxmygroups.jpg',get_lang('UsersOnline')).'</div>
<div class="social-box-content1">
<div><p class="groupTex3"><strong>'.get_lang('UsersOnline').'</strong> </p></div>
<div>';
echo '<center>'.SocialManager::display_user_list($user_online_list).'</center>';
echo '</div>
</div>
</div>';
}
echo '</div>';

@ -30,7 +30,7 @@ echo '<div id="social-content">';
echo '<div id="social-content-left">';
//this include the social menu div
SocialManager::show_social_menu('friends');
SocialManager::show_social_menu('classes');
echo '</div>';
echo '<div id="social-content-right">';
@ -56,6 +56,10 @@ if (!empty($usergroup_list)) {
$data = $usergroup->get($group_id);
echo Display::tag('div',$data['name']);
}
} else {
if (api_is_platform_admin()) {
Display::display_normal_message(Display::url(get_lang('CreateAgroup') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add'), false);
}
}
echo '</div>';
Display :: display_footer();
Loading…
Cancel
Save