diff --git a/main/css/blue_lagoon/default.css b/main/css/blue_lagoon/default.css
index 6d16dd4be9..2cb7167662 100755
--- a/main/css/blue_lagoon/default.css
+++ b/main/css/blue_lagoon/default.css
@@ -2156,6 +2156,21 @@ div.comments {
font-weight:bolder;
vertical-align:middle;
}
+
+.actions-title-groups {
+ //background:#efefef;
+ //border-bottom:1px dotted #999999;
+ //border-top:1px dotted #999999;
+ padding-left:0px;
+ padding-right:0px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ margin-bottom: 5px;
+ font-size:14px;
+ font-weight:bolder;
+ vertical-align:middle;
+}
+
/**********************************************
* MESSAGE TOOL *
**********************************************/
@@ -2352,6 +2367,27 @@ div.image-social-content center.friend {
width:30%;
margin-left: 4px;
}
+#socialContent{
+ width:100%;
+ height:auto;
+ overflow:hidden;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+#socialContentRigth{
+ height:auto;
+ float:rigth;
+ overflow:hidden;
+ }
+#socialContentLeft {
+ float:left;
+ height:auto;
+ margin-right:16px;
+ min-height:300px;
+ width:160px;
+ overflow:hidden;
+}
/*****************************************************
* BUTTONS *
*****************************************************/
@@ -2847,47 +2883,74 @@ a.unread {
.groups_grid_element_2 { width:150px; float:left;}
/*POPULAR GROUP*/
-.popular_grid_container { width:100%;}
.popular_grid_item {
- border:1px dotted #CCCCCC;
float:left;
- height:90px;
- margin:5px;
- padding:5px;
- width:500px;
+ width:350px;
+ height:165px;
+ margin-top:20px;
+ }
+
+.popular_grid_element_1 {
+ width:330px;
+ height:165px;
+ padding-left:10px;
+ padding-right:10px;
+ background-image:url(../../img/boxmygroupscontent.jpg);
+ background-repeat:repeat-y;
+ overflow:hidden;
}
-.popular_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
-.popular_grid_element_1 { width:350px; float:left; text-align:left; margin-bottom:1px; padding:1px;}
-.popular_grid_element_2 { width:200px; float:left;}
-.popular_grid_element_3 { width:200px; float:left; text-align:justify;}
+
/*NEWEST GROUP*/
-.newest_grid_container { width:100%;}
+
.newest_grid_item {
- border:1px dotted #CCCCCC;
float:left;
- height:90px;
- margin:5px;
- padding:5px;
- width:500px;
+ width:350px;
+ height:165px;
+ margin-top:20px;
+ }
+
+.newest_grid_element_1 {
+ width:330px;
+ height:165px;
+ padding-left:10px;
+ padding-right:10px;
+ background-image:url(../../img/boxmygroupscontent.jpg);
+ background-repeat:repeat-y;
+ overflow:hidden;
}
-.newest_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
-.newest_grid_element_1 { width:350px; float:left; text-align:left; margin-bottom:1px; padding:1px;}
-.newest_grid_element_2 { width:400px; float:left; text-align:justify;}
/*MY GROUPS*/
-.mygroups_grid_container { width:100%;}
+
+
.mygroups_grid_item {
- border:1px dotted #CCCCCC;
float:left;
- height:90px;
- margin:5px;
- padding:5px;
- width:500px;
+ width:350px;
+ height:165px;
+ margin-top:20px;
}
-.mygroups_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
-.mygroups_grid_element_1 { width:350px; float:left; text-align:left; margin-bottom:1px; padding:1px;}
-.mygroups_grid_element_2 { width:400px; float:left; text-align:justify;}
+
+.mygroups_grid_element_1 {
+ width:330px;
+ height:165px;
+ padding-left:10px;
+ padding-right:10px;
+ background-image:url(../../img/boxmygroupscontent.jpg);
+ background-repeat:repeat-y;
+ overflow:hidden;
+}
+
+.box_description_group_title {
+ float:right;width:80%;
+}
+.box_description_group_content {
+ float:right;width:80%;height:40px;
+}
+.box_description_group_actions {
+ float:right;width:80%;text-align:right;margin-top:4px;
+}
+
+//.mygroups_grid_element_2 { width:400px; float:left; text-align:justify;}
/*PROFILE*/
.profile_grid_container { width:100%;}
@@ -3022,6 +3085,118 @@ a.unread {
float:right;
}
+/* SOCIAL MENU VERTICAL */
+.socialMenu {
+ width:150px;
+ height:auto;
+}
+
+.socialMenu ul {
+ list-style-image:none;
+ list-style-position:outside;
+ list-style-type:none;
+ margin:0;
+ padding:0px;
+}
+
+.socialMenu li {
+ margin-bottom:8px;
+ padding-bottom:4px;
+ background-image:url(../../img/line-social.jpg);
+ background-position:bottom;
+ background-repeat:repeat-x;
+}
+
+.socialMenu ul li a{
+ padding:2px 0px;
+}
+
+.socialMenuSubLevel {
+ margin-left:20px;}
+
+.menuTitle{
+ width:150px;
+ float:left;
+ height:20px;
+ background-color:#32578b;
+ margin-bottom:10px;
+}
+.TitleRigth{
+ width:88%;
+ float:right;
+ height:20px;
+ background-color:#32578b;
+ margin-bottom:10px;
+}
+.menuTex1{
+ color:#fff;
+ font-size:14px;
+ font-weight:normal;
+ }
+.menuTex2{
+ color:#000;
+ font-weight:normal;
+ font-size:12px;
+ }
+.menuTex3{
+ color:#94cdf9;
+ font-weight:normal;
+ font-size:12px;
+ font-weight:bold;
+ }
+
+/*BOX MY GROPUPS*/
+
+#boxmyGroups{
+ height:auto;
+ overflow:hidden;
+ }
+
+#boxmyGroupsLeft{
+ width:100%;
+ //float:left;
+ height:auto;
+}
+#boxmyGroupsRigth{
+ width:350px;
+ float:left;
+ height:auto;
+}
+
+.boxMygroupsContent {
+ width:350px;
+ height:auto;
+ margin-top:20px;
+ }
+
+.myGroupsContent{
+ width:330px;
+ height:auto;
+ overflow:hidden;
+ padding-left:10px;
+ padding-right:10px;
+ background-image:url(../../img/boxmygroupscontent.jpg);
+ background-repeat:repeat-y;
+ overflow:hidden;
+}
+
+.imageGroups{
+ border: 2px solid #cac9c9;
+ }
+
+
+.groupTex1{
+ font-family:Verdana, Geneva, sans-serif;
+ font-size:12px;
+ color:#686868;
+}
+
+.groupText2{
+ font-family:Verdana, Geneva, sans-serif;
+ font-size:12px;
+ color:#666699;
+}
+
/* INVITATIONS */
.invitation_confirm {
diff --git a/main/img/boxmygroups.jpg b/main/img/boxmygroups.jpg
new file mode 100644
index 0000000000..deda4ed25b
Binary files /dev/null and b/main/img/boxmygroups.jpg differ
diff --git a/main/img/boxmygroupscontent.jpg b/main/img/boxmygroupscontent.jpg
new file mode 100644
index 0000000000..c68ee5b389
Binary files /dev/null and b/main/img/boxmygroupscontent.jpg differ
diff --git a/main/img/line-social.jpg b/main/img/line-social.jpg
new file mode 100644
index 0000000000..b5fde9d7e6
Binary files /dev/null and b/main/img/line-social.jpg differ
diff --git a/main/img/linegroups.jpg b/main/img/linegroups.jpg
new file mode 100644
index 0000000000..13ae8595d6
Binary files /dev/null and b/main/img/linegroups.jpg differ
diff --git a/main/inc/lib/group_portal_manager.lib.php b/main/inc/lib/group_portal_manager.lib.php
index 5d34c18ab2..e6aef0562f 100755
--- a/main/inc/lib/group_portal_manager.lib.php
+++ b/main/inc/lib/group_portal_manager.lib.php
@@ -206,8 +206,8 @@ class GroupPortalManager
while ($row = Database::fetch_array($result, 'ASSOC')) {
if ($with_image == true) {
$picture = self::get_picture_group($row['id'], $row['picture_uri'],80);
- $img = '';
- $row['picture_uri'] = $img;
+ //$img = '
';
+ $row['picture_uri'] = $picture['file'];
}
$array[$row['id']] = $row;
}
@@ -232,8 +232,7 @@ class GroupPortalManager
$num = intval($num);
}
// only show admins and readers
- $where_relation_condition = " WHERE gu.relation_type IN ('".GROUP_USER_PERMISSION_ADMIN."' , '".GROUP_USER_PERMISSION_READER."') ";
-
+ $where_relation_condition = " WHERE gu.relation_type IN ('".GROUP_USER_PERMISSION_ADMIN."' , '".GROUP_USER_PERMISSION_READER."') ";
$sql = "SELECT count(user_id) as count, g.picture_uri, g.name, g.description, g.id
FROM $tbl_group g
INNER JOIN $table_group_rel_user gu
@@ -244,8 +243,8 @@ class GroupPortalManager
while ($row = Database::fetch_array($result, 'ASSOC')) {
if ($with_image == true) {
$picture = self::get_picture_group($row['id'], $row['picture_uri'],80);
- $img = '
';
- $row['picture_uri'] = $img;
+ //$img = '
';
+ $row['picture_uri'] = $picture['file'];
}
$array[$row['id']] = $row;
}
@@ -276,12 +275,12 @@ class GroupPortalManager
$result=Database::query($sql,__FILE__,__LINE__);
$array = array();
while ($row = Database::fetch_array($result, 'ASSOC')) {
- if ($with_image == true) {
- $picture = self::get_picture_group($row['id'], $row['picture_uri'],80);
- $img = '
';
- $row['picture_uri'] = $img;
- }
- $array[$row['id']] = $row;
+ if ($with_image == true) {
+ $picture = self::get_picture_group($row['id'], $row['picture_uri'],80);
+ //$img = '
';
+ $row['picture_uri'] = $picture['file'];
+ }
+ $array[$row['id']] = $row;
}
return $array;
}
diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php
index 83bf7666d0..d9eb141376 100755
--- a/main/inc/lib/message.lib.php
+++ b/main/inc/lib/message.lib.php
@@ -877,7 +877,8 @@ class MessageManager
$name = api_get_person_name($user_sender_info['firstname'], $user_sender_info['lastname']);
$html .= '
'; - // Everybody can create groups - if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') { - echo ''.get_lang('CreateAgroup').''; - } else { - // Only admins and teachers can create groups - if (api_is_allowed_to_edit(null,true)) { - echo ''.get_lang('CreateAgroup').''; + $name .= Display::return_icon('moderator_star.png', get_lang('Moderator')); + } + $count_users_group = count(GroupPortalManager::get_all_users_by_group($id)); + if ($count_users_group == 1 ) { + $count_users_group = $count_users_group.' '.get_lang('Member'); + } else { + $count_users_group = $count_users_group.' '.get_lang('Members'); + } + + $result['picture_uri'] = '
'.$name.'
'.$url_close.Display::return_icon('linegroups.jpg').'('.$count_users_group.')
'.get_lang('MyGroups').'
'; - - if (count($groups) > 0) { - Display::display_sortable_grid('mygroups', array(), $groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false)); - } - - - // Newest groups -------- - + + // Newest groups -------- $results = GroupPortalManager::get_groups_by_age(); - $groups = array(); + $grid_newest_groups = array(); foreach ($results as $result) { - $id = $result['id']; $url_open = ''; - $url_close = ''; - $groups[]= array($url_open.$result['picture_uri'].$url_close, $url_open.$result['name'].$url_close, cut($result['description'],180,true)); + $url_close = ''; + $count_users_group = count(GroupPortalManager::get_all_users_by_group($id)); + if ($count_users_group == 1 ) { + $count_users_group = $count_users_group.' '.get_lang('Member'); + } else { + $count_users_group = $count_users_group.' '.get_lang('Members'); + } + + $name = cut($result['name'],30,true); + $result['picture_uri'] = ''.$name.'
'.$url_close.Display::return_icon('linegroups.jpg').'('.$count_users_group.')
'.get_lang('Newest').'
'; - Display::display_sortable_grid('newest', array(), $groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false)); - } - - // Pop groups ----- + // Pop groups ----- $results = GroupPortalManager::get_groups_by_popularity(); - $groups = array(); + $grid_pop_groups = array(); foreach ($results as $result) { $id = $result['id']; $url_open = ''; - $url_close = ''; - + $url_close = ''; if ($result['count'] == 1 ) { $result['count'] = $result['count'].' '.get_lang('Member'); } else { $result['count'] = $result['count'].' '.get_lang('Members'); - } + } + $count_users_group = $result['count']; - $groups[]= array($url_open.$result['picture_uri'].$url_close, $url_open.$result['name'].$url_close,$result['count'],cut($result['description'],120,true)); - } - if (count($groups) > 0) { - echo ''.get_lang('Popular').'
'; - Display::display_sortable_grid('popular', array(), $groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true)); + $name = cut($result['name'],30,true); + $result['picture_uri'] = ''.$name.'
'.$url_close.Display::return_icon('linegroups.jpg').'('.$count_users_group.')
'.get_lang('MyGroups').'
'; + if (count($grid_my_groups) > 0) { + Display::display_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false)); + } + if (count($grid_newest_groups) > 0) { + echo ''.get_lang('Newest').'
'; + Display::display_sortable_grid('newest', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false)); + } + if (count($grid_pop_groups) > 0) { + echo ''.get_lang('Popular').'
'; + Display::display_sortable_grid('popular', array(), $grid_pop_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true)); + } + echo '