UI improvements in groups & messages & social network see CT#190

skala
Julio Montoya 15 years ago
parent 8cc51de8e9
commit 4f32ba3f4e
  1. 18
      main/css/blue_lagoon/default.css
  2. 9
      main/inc/lib/group_portal_manager.lib.php
  3. 2
      main/inc/lib/javascript/tag/style.css
  4. 4
      main/messages/inbox.php
  5. 8
      main/messages/new_message.php
  6. 4
      main/messages/outbox.php
  7. 6
      main/social/group_add.php
  8. 6
      main/social/group_edit.php
  9. 2
      main/social/group_invitation.php
  10. 21
      main/social/groups.php
  11. 45
      main/social/profile.php
  12. 3
      whoisonline.php

@ -2843,6 +2843,24 @@ a.unread {
.groups_grid_element_2 { width:150px; float:left;}
/* Groups boxes */
.group_invitation_grid_container { width:100%;}
.group_invitation_grid_item {
border:1px dotted #CCCCCC;
float:left;
height:85px;
margin:8px;
padding:5px;
width:300px;
}
.group_invitation_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
.group_invitation_grid_element_1 { width:100px; float:left; text-align:left;margin-bottom:5px;}
.group_invitation_grid_element_2 { width:150px; float:left;}
/* User boxes */
.search_users_grid_container { width:100%;}
.search_users_grid_item { width:400px; height: 90px; border:1px dotted #ccc; float:left; padding:5px; margin:8px;}

@ -1164,9 +1164,9 @@ class GroupPortalManager
case GROUP_USER_PERMISSION_READER:
// I'm just a reader
echo get_lang('IamAReader');
echo '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'" class="thickbox" title="'.get_lang('ComposeMessage').'">'.Display::return_icon('message_new.png', get_lang('NewTopic')).'&nbsp;'.get_lang('NewTopic').'</a></li>';
echo '<li><a href="groups.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.get_lang('LeaveGroup').'</a></li>';
echo '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'" class="thickbox" title="'.get_lang('ComposeMessage').'">'.Display::return_icon('message_new.png', get_lang('NewTopic')).'&nbsp;'.get_lang('NewTopic').'</a></li>';
echo '<li><a href="group_invitation.php?id='.$group_id.'">'.get_lang('InviteFriends').'</a></li>';
echo '<li><a href="groups.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.get_lang('LeaveGroup').'</a></li>';
break;
case GROUP_USER_PERMISSION_ADMIN:
@ -1190,6 +1190,7 @@ class GroupPortalManager
echo '<li><a href="group_members.php?id='.$group_id.'">'.get_lang('MemberList').'</a></li>';
echo '<li><a href="group_waiting_list.php?id='.$group_id.'">'.get_lang('WaitingList').'</a></li>';
echo '<li><a href="group_invitation.php?id='.$group_id.'">'.get_lang('InviteFriends').'</a></li>';
echo '<li><a href="groups.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.get_lang('LeaveGroup').'</a></li>';
break;
case GROUP_USER_PERMISSION_ANONYMOUS:
echo '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.get_lang('JoinGroup').'</a></li>';
@ -1211,8 +1212,8 @@ class GroupPortalManager
}
echo '<div class="group_member_item"><a href="profile.php?u='.$user['user_id'].'">';
echo '<div class="group_member_picture">'.$user['image'].'</div>';
echo api_get_person_name($user['firstname'], $user['lastname']).'</a></div>';
echo '<div class="group_member_picture">'.$user['image'].'</div>';
echo api_get_person_name($user['firstname'], $user['lastname']).'</a></div>';
}
}
echo '</div>';

@ -1,5 +1,5 @@
/* TextboxList sample CSS */
ul.holder { margin: 0; border: 1px solid #999; overflow: hidden; height: auto !important; height: 1%; padding: 4px 5px 0; }
ul.holder { margin: 0; border: 1px solid #ccc; overflow: hidden; height: auto !important; height: 1%; padding: 4px 5px 0; }
*:first-child+html ul.holder { padding-bottom: 2px; } * html ul.holder { padding-bottom: 2px; } /* ie7 and below */
ul.holder li { float: left; list-style-type: none; margin: 0 5px 4px 0; white-space:nowrap;}
ul.holder li.bit-box, ul.holder li.bit-input input { font: 11px "Lucida Grande", "Verdana"; }

@ -117,11 +117,11 @@ $table_message = Database::get_main_table(TABLE_MESSAGE);
//api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox')));
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
}

@ -174,10 +174,10 @@ function manage_form ($default, $select_from_user_list = null) {
$form->addElement('hidden','group_id',$group_id);
$form->addElement('hidden','parent_id',$message_id);
}
$form->add_textfield('title', get_lang('Title'),true ,array('size' => 75));
$form->add_textfield('title', get_lang('Title'),true ,array('size' => 77));
//$form->add_html_editor('content', '', false, false, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
$form->addElement('textarea','content', get_lang('Message'), array('cols' => 75,'rows'=>5));
$form->addElement('textarea','content', get_lang('Message'), array('cols' => 75,'rows'=>8));
if (isset($_GET['re_id'])) {
$form->addElement('hidden','re_id',Security::remove_XSS($_GET['re_id']));
@ -227,11 +227,11 @@ function manage_form ($default, $select_from_user_list = null) {
*/
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
}

@ -59,11 +59,11 @@ function deselect_all(formita)
//api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox')));
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
$interbreadcrumb[]= array ('url' => 'outbox.php','name' => get_lang('Inbox'));
}

@ -21,19 +21,19 @@ $table_message = Database::get_main_table(TABLE_MESSAGE);
$form = new FormValidator('add_group');
// name
$form->addElement('text', 'name', get_lang('Name'));
$form->addElement('text', 'name', get_lang('Name'), array('size'=>30));
$form->applyFilter('name', 'html_filter');
$form->applyFilter('name', 'trim');
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
// Description
$form->addElement('textarea', 'description', get_lang('Description'));
$form->addElement('textarea', 'description', get_lang('Description'), array('rows'=>5, 'cols'=>50));
$form->applyFilter('description', 'html_filter');
$form->applyFilter('description', 'trim');
// url
$form->addElement('text', 'url', get_lang('URL'));
$form->addElement('text', 'url', get_lang('URL'), array('size'=>30));
$form->applyFilter('url', 'html_filter');
$form->applyFilter('url', 'trim');

@ -43,18 +43,18 @@ $form = new FormValidator('group_edit', 'post', '', '', array('style' => 'width:
$form->addElement('hidden', 'id', $group_id);
// name
$form->addElement('text', 'name', get_lang('Name'));
$form->addElement('text', 'name', get_lang('Name'), array('size'=>30));
$form->applyFilter('name', 'html_filter');
$form->applyFilter('name', 'trim');
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
// Description
$form->addElement('textarea', 'description', get_lang('Description'));
$form->addElement('textarea', 'description', get_lang('Description'), array('rows'=>5, 'cols'=>50));
$form->applyFilter('description', 'html_filter');
$form->applyFilter('description', 'trim');
// url
$form->addElement('text', 'url', get_lang('URL'));
$form->addElement('text', 'url', get_lang('URL'), array('size'=>30));
$form->applyFilter('url', 'html_filter');
$form->applyFilter('url', 'trim');

@ -560,7 +560,7 @@ function makepost(select){
$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('search_users', array(), $members, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true));
Display::display_sortable_grid('group_invitation', array(), $members, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true));
}

@ -177,15 +177,20 @@ if ($group_id != 0 ) {
$results = GroupPortalManager::get_groups_by_user(api_get_user_id(), 0, true);
$groups = array();
foreach ($results as $result) {
$id = $result['id'];
$url_open = '<a href="groups.php?id='.$id.'">';
$url_close = '</a>';
if ($result['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
$result['name'].= Display::return_icon('admin_star.png', get_lang('Admin'));
if (is_array($results) && count($results) > 0) {
foreach ($results as $result) {
$id = $result['id'];
$url_open = '<a href="groups.php?id='.$id.'">';
$url_close = '</a>';
if ($result['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
$result['name'].= Display::return_icon('admin_star.png', get_lang('Admin'));
}
if ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
$result['name'].= Display::return_icon('moderator_star.png', get_lang('Moderator'));
}
$groups[]= array($url_open.$result['picture_uri'].$url_close, $url_open.$result['name'].$url_close,cut($result['description'],140));
}
$groups[]= array($url_open.$result['picture_uri'].$url_close, $url_open.$result['name'].$url_close,cut($result['description'],140));
}
echo '<h1>'.get_lang('MyGroups').'</h1>';

@ -453,42 +453,47 @@ echo '<div id="social-profile-container">';
//--- User image
echo '<div class="social-content-image">';
echo '<div class="social-background-content" style="width:95%;" align="center">';
echo '<br/>';
if ($img_array['file'] != 'unknown.jpg') {
echo '<a class="thickbox" href="'.$big_image.'"><img src='.$img_array['dir'].$img_array['file'].' /> </a><br /><br />';
} else {
echo '<img src='.$img_array['dir'].$img_array['file'].' /><br /><br />';
}
echo '</div>';
echo '<br/>';
if ($img_array['file'] != 'unknown.jpg') {
echo '<a class="thickbox" href="'.$big_image.'"><img src='.$img_array['dir'].$img_array['file'].' /> </a><br /><br />';
} else {
echo '<img src='.$img_array['dir'].$img_array['file'].' /><br /><br />';
}
echo '</div>';
echo '<br/>';
echo '<div class="actions" style="margin-right:5px;">';
echo '&nbsp;<a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?height=300&width=610&user_friend='.$user_id.'&view=profile&view_panel=1" class="thickbox" title="'.get_lang('SendMessage').'">';
echo Display::return_icon('message_new.png').'&nbsp;&nbsp;'.get_lang('SendMessage').'</a><br />';
echo '</div>';
echo '<br/>';
$html_actions = '';
if ($user_id != api_get_user_id()) {
$html_actions = '&nbsp;<a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?height=300&width=610&user_friend='.$user_id.'&view=profile&view_panel=1" class="thickbox" title="'.get_lang('SendMessage').'">';
$html_actions .= Display::return_icon('message_new.png').'&nbsp;&nbsp;'.get_lang('SendMessage').'</a><br />';
}
//check if I already sent an invitation message
$invitation_sent_list = SocialManager::get_list_invitation_sent_by_user_id(api_get_user_id());
if (is_array($invitation_sent_list) && is_array($invitation_sent_list[$user_id]) && count($invitation_sent_list[$user_id]) >0 ) {
echo '<a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('YouAlreadySentAnInvitation').'</a>';
$html_actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('YouAlreadySentAnInvitation').'</a>';
} else {
if (!$show_full_profile) {
echo '&nbsp;<a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?view_panel=2&height=260&width=610&user_friend='.$user_id.'" class="thickbox" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('add_multiple_users.gif', get_lang('SocialInvitationToFriends')).'&nbsp;'.get_lang('SendInvitation').'</a>';
$html_actions .= '&nbsp;<a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?view_panel=2&height=260&width=610&user_friend='.$user_id.'" class="thickbox" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('add_multiple_users.gif', get_lang('SocialInvitationToFriends')).'&nbsp;'.get_lang('SendInvitation').'</a>';
}
}
if (!empty($html_actions )) {
echo '<div class="actions" style="margin-right:5px;">';
echo $html_actions;
echo '</div>';
echo '<br />';
echo '<br />';
}
// Extra information
if ($show_full_profile) {
//-- Extra Data
$t_uf = Database :: get_main_table(TABLE_MAIN_USER_FIELD);
$t_ufo = Database :: get_main_table(TABLE_MAIN_USER_FIELD_OPTIONS);
$t_uf = Database :: get_main_table(TABLE_MAIN_USER_FIELD);
$t_ufo = Database :: get_main_table(TABLE_MAIN_USER_FIELD_OPTIONS);
$extra_user_data = UserManager::get_extra_user_data($user_id);
$extra_information = '';
if (is_array($extra_user_data) && count($extra_user_data)>0 ) {

@ -147,8 +147,7 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if ($user_list) {
if (!isset($_GET['id'])) {
if (!api_is_anonymous())
echo UserManager::get_search_form($_GET['q']);
echo UserManager::get_search_form($_GET['q']);
SocialManager::display_user_list($user_list, $_plugins);
} else {
//individual user information - also displays header info

Loading…
Cancel
Save