adding style (partial) for social network - partial CT#446

skala
Cristian Fasanando 15 years ago
parent 3768a5cb01
commit 8afaf6f359
  1. 2
      main/inc/lib/group_portal_manager.lib.php
  2. 44
      main/social/group_edit.php
  3. 45
      main/social/group_invitation.php
  4. 88
      main/social/group_members.php
  5. 2
      main/social/home.php

@ -981,7 +981,7 @@ class GroupPortalManager
}
if ($more_link) {
//More link
echo '<div class="mygroups_more" style="margin-top:20px;"><a href="mygroups.php?u='.$user_id.'">'.get_lang('SeeMore').'</a></div>';
echo '<div class="mygroups_more" style="margin-top:20px;"><a href="groups.php?view=mygroups">'.get_lang('SeeMore').'</a></div>';
}
echo '</div>';
}

@ -126,13 +126,23 @@ if ( $form->validate()) {
Display::display_header($tool_name);
//show the action menu
SocialManager::show_social_menu();
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('Groups');
echo '</div>';
*/
// Group picture
$image_path = GroupPortalManager::get_group_picture_path_by_id($group_id,'web');
@ -162,21 +172,19 @@ if ($image == '') {
echo '<input type="image" '.$img_attributes.' onclick="javascript: return show_image(\''.$url_big_image.'\',\''.$big_image_width.'\',\''.$big_image_height.'\');"/>';
}
*/
//Shows left column
echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
//-- Show message groups
echo '<div id="layout_right" style="margin-left: 282px;">';
//echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
echo '<div id="socialContent">';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('group_messages',$group_id);
echo '</div>';
echo '<div class="socialContentRight">';
// Display form
$form->display();
echo '</div>'; // end layout right
$form->display();
echo '</div>';
echo '</div>';
// Footer
Display::display_footer();
Display::display_footer();

@ -212,10 +212,22 @@ $users=$sessions=array();
Display :: display_header($tool_name, 'Groups');
SocialManager::show_social_menu();
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('Invitations');
echo '</div>';
*/
if($_POST['form_sent']) {
$form_sent = $_POST['form_sent'];
@ -324,10 +336,15 @@ if ($add_type == 'multiple') {
/* <?php $link_add_type_unique ?>&nbsp;|&nbsp;<?php $link_add_type_multiple ?> */
//Shows left column
echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
//echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
//-- Show group content
echo '<div id="layout_right" style="margin-left: 282px;">';
echo '<div id="socialContent">';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('group_messages',$group_id);
echo '</div>';
echo '<div class="socialContentRight">';
?>
<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $group_id; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
@ -371,7 +388,7 @@ if(!empty($errorMsg)) {
}
?>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<table border="0" cellpadding="5" cellspacing="0" width="80%">
<!-- Users -->
<tr>
<td align="center"><b><?php echo get_lang('Friends') ?> :</b>
@ -470,8 +487,18 @@ unset($sessionUsersList);
</form>
<?php
//current group members
$members = GroupPortalManager::get_users_by_group($group_id, true, array(GROUP_USER_PERMISSION_PENDING_INVITATION));
if (is_array($members) && count($members)>0) {
echo get_lang('UsersAlreadyInvited');
Display::display_sortable_grid('invitation_profile', array(), $members, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true));
}
echo '</div>'; // end layout right
echo '</div>'; //
?>
<script type="text/javascript">
@ -567,14 +594,6 @@ function makepost(select){
</script>
<?php
//current group members
$members = GroupPortalManager::get_users_by_group($group_id, true, array(GROUP_USER_PERMISSION_PENDING_INVITATION));
if (is_array($members) && count($members)>0) {
echo get_lang('UsersAlreadyInvited');
Display::display_sortable_grid('invitation_profile', array(), $members, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true));
}
/*
==============================================================================
FOOTER

@ -38,15 +38,26 @@ if (empty($group_id)) {
Display :: display_header($tool_name, 'Groups');
SocialManager::show_social_menu();
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('GroupMembers');
echo '</div>';
echo '</div>';
*/
$show_message = '';
//if i'm a moderator
if (isset($_GET['action']) && $_GET['action']=='add') {
// we add a user only if is a open group
$user_join = intval($_GET['u']);
@ -94,44 +105,41 @@ if (! empty($show_message)){
$users = GroupPortalManager::get_users_by_group($group_id, true, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000);
$new_member_list = array();
//Shows left column
echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
//-- Show message groups
echo '<div id="layout_right" style="margin-left: 282px;">';
// Display form
foreach($users as $user) {
switch ($user['relation_type']) {
case GROUP_USER_PERMISSION_ADMIN:
$user['link'] = Display::return_icon('admin_star.png', get_lang('Admin'));
break;
case GROUP_USER_PERMISSION_READER:
if (in_array($user_role, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) {
$user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=delete">'.Display::return_icon('del_user_big.gif', get_lang('DeleteFromGroup')).'</a>'.
'<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=set_moderator">'.Display::return_icon('admins.gif', get_lang('AddModerator')).'</a>';
echo '<div id="socialContent">';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('group_messages',$group_id);
echo '</div>';
echo '<div class="socialContentRight">';
foreach($users as $user) {
switch ($user['relation_type']) {
case GROUP_USER_PERMISSION_ADMIN:
$user['link'] = Display::return_icon('admin_star.png', get_lang('Admin'));
break;
case GROUP_USER_PERMISSION_READER:
if (in_array($user_role, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) {
$user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=delete">'.Display::return_icon('del_user_big.gif', get_lang('DeleteFromGroup')).'</a>'.
'<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=set_moderator">'.Display::return_icon('admins.gif', get_lang('AddModerator')).'</a>';
}
break;
case GROUP_USER_PERMISSION_PENDING_INVITATION:
$user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=add">'.Display::return_icon('pending_invitation.png', get_lang('PendingInvitation')).'</a>';
break;
case GROUP_USER_PERMISSION_MODERATOR:
$user['link'] = Display::return_icon('moderator_star.png', get_lang('Moderator'));
//only group admin can manage moderators
if ($user_role == GROUP_USER_PERMISSION_ADMIN) {
$user['link'] .='<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=delete_moderator">'.Display::return_icon('del_user_big.gif', get_lang('DeleteModerator')).'</a>';
}
break;
}
break;
case GROUP_USER_PERMISSION_PENDING_INVITATION:
$user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=add">'.Display::return_icon('pending_invitation.png', get_lang('PendingInvitation')).'</a>';
break;
case GROUP_USER_PERMISSION_MODERATOR:
$user['link'] = Display::return_icon('moderator_star.png', get_lang('Moderator'));
//only group admin can manage moderators
if ($user_role == GROUP_USER_PERMISSION_ADMIN) {
$user['link'] .='<a href="group_members.php?id='.$group_id.'&u='.$user['user_id'].'&action=delete_moderator">'.Display::return_icon('del_user_big.gif', get_lang('DeleteModerator')).'</a>';
}
break;
}
$new_member_list[] = $user;
}
if (count($new_member_list) > 0) {
Display::display_sortable_grid('list_members', array(), $new_member_list, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true,false,true,true));
}
$new_member_list[] = $user;
}
if (count($new_member_list) > 0) {
Display::display_sortable_grid('list_members', array(), $new_member_list, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true,false,true,true));
}
echo '</div>';
echo '</div>';
echo '</div>'; // end layout right
Display :: display_footer();
?>

@ -86,7 +86,7 @@ echo '<div id="socialContent">';
<div><p><strong>'.get_lang('Name').'</strong><br /><span class="groupText4">'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</span></p></div>
<div><p><strong>'.get_lang('Email').'</strong><br /><span class="groupText4">'.($user_info['email']?$user_info['email']:'').'</span></p></div>
<div><p><strong>'.get_lang('Phone').'</strong><br /><span class="groupText4">'.($user_info['phone']?$user_info['phone']:'').'</span></p></div>
<div class="box_description_group_actions" ><a href="profile.php">'.get_lang('SeeMore').$url_close.'</div>
<div class="box_description_group_actions" ><a href="profile.php">'.get_lang('SeeMore').$url_close.'</a></div>
</div>
</div>';

Loading…
Cancel
Save