diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css
index 57e47bfe94..c98cdd1def 100644
--- a/app/Resources/public/css/base.css
+++ b/app/Resources/public/css/base.css
@@ -1425,107 +1425,6 @@ a.unread {
text-align:right;
}
-#group_description {
- margin: 10px 0px 10px 0px;
-}
-
-#group_privacy {
- margin: 10px 0px 10px 0px;
-}
-
-#group_permissions {
- -moz-background-clip:border;
- -moz-background-inline-policy:continuous;
- -moz-background-origin:padding;
- -moz-border-radius-bottomleft:8px;
- -moz-border-radius-bottomright:8px;
- -moz-border-radius-topleft:8px;
- -moz-border-radius-topright:8px;
- background:#EEE none repeat scroll 0 0;
- margin: 20px 0px 20px 0px;
-}
-
-#group_permissions ul {
- list-style-image:none;
- list-style-position:outside;
- list-style-type:none;
- margin:0;
- padding:0;
-}
-
-#group_permissions ul li {
- margin: 10px 0px 10px 5px;
-}
-
-/* Groups boxes */
-
-.groups_grid_container {
- width:100%;
-}
-.groups_grid_item {
- width:80px;
- float:left;
- margin:5px;
-}
-.groups_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
-.groups_grid_element_1 { width:100px; float:left; text-align:left; margin-bottom:5px;}
-.groups_grid_element_2 { width:150px; float:left;}
-
-/*MY GROUPS*/
-
-.mygroups_grid_item {
- border-bottom:1px solid #EAEAEA;
- float: left;
- height: 70px;
- margin: 0 8px 15px 15px;
- padding: 16px 12px 40px 0px;
- width:600px;
-}
-
-.topic_div {
- width:620px;
- border-bottom:1px solid #EAEAEA;
- margin-bottom: 20px;
- height: 96px;
-}
-
-.box_description_group_member {
- color: #999999;
- font-size: 10px;
-}
-
-.mygroups_grid_element_1 {
- width:600px;
- height:100px;
- overflow:hidden;
-}
-
-.box_description_group_title h2 {
- margin-bottom:4px;
- margin-top: 0px;
-}
-
-.box_description_group_title {
- float:right;
- width:530px;
-}
-.box_description_group_content {
- float:right;
- width:530px;
- margin-top:5px;
- /* height:45px;*/
- font-family:Verdana, Geneva, sans-serif;
- font-size:12px;
- color:#666666;
-}
-.box_description_group_actions {
- float:right;
- width:530px;
- text-align:right;
- margin-top:4px;
- margin-right:4px;
-}
-
/* Big icons course home page styles */
#course_tools .big_icon {
padding:10px;
@@ -4122,6 +4021,10 @@ i.size-32.icon-new-work{
padding-bottom: 0px;
font-size: 11px;
}
+.sm-groups .social-profile .img-responsive{
+ display: inline-block;
+ width: 100px;
+}
.social-post .mediaPost{
padding-top:10px;
padding-bottom: 5px;
diff --git a/main/inc/lib/text.lib.php b/main/inc/lib/text.lib.php
index 83610f480b..7484fa008a 100755
--- a/main/inc/lib/text.lib.php
+++ b/main/inc/lib/text.lib.php
@@ -633,7 +633,7 @@ function _split_str_by_whitespace( $string, $goal ) {
function cut($text, $maxchar, $embed = false) {
if (api_strlen($text) > $maxchar) {
if ($embed) {
- return ''.api_substr($text, 0, $maxchar).'...';
+ return '
'.api_substr($text, 0, $maxchar).'...
';
}
return api_substr($text, 0, $maxchar).' ...';
}
diff --git a/main/social/groups.php b/main/social/groups.php
index ff68d77a96..e770e5ecdf 100755
--- a/main/social/groups.php
+++ b/main/social/groups.php
@@ -64,15 +64,15 @@ if (is_array($results) && count($results) > 0) {
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
$result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
$my_group_list[] = $id;
- $url_open = '';
- $url_close = '';
-
$name = cut($result['name'], GROUP_TITLE_LENGTH, true);
+
if ($result['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
$name .= ' '.Display::return_icon('social_group_admin.png', get_lang('Admin'), array('style'=>'vertical-align:middle'));
} elseif ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
$name .= ' '.Display::return_icon('social_group_moderator.png', get_lang('Moderator'), array('style'=>'vertical-align:middle'));
}
+ $url = '' . $name . '';
+
$count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000));
if ($count_users_group == 1 ) {
$count_users_group = $count_users_group.' '.get_lang('Member');
@@ -82,19 +82,26 @@ if (is_array($results) && count($results) > 0) {
$picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
$result['picture'] = '
';
- $item_0 = Display::div($result['picture'], array('class'=>'box_description_group_image'));
- $members = Display::span($count_users_group, array('class'=>'box_description_group_member'));
- $item_1 = Display::div(Display::tag('h4', $url_open.$name.$url_close).$members, array('class'=>'box_description_group_title'));
-
- $item_2 = '';
- $item_3 = '';
+
+ $members = Display::returnFontAwesomeIcon('user').$count_users_group;
+ $html = '';
+ $html .= '
';
+ $html .= $result['picture'];
+ $html .= '
';
+ $html .= '
';
+ $html .= '
';
+ $html .= Display::tag('h5', $url);
+ $html .= '
';
+ $html .= '
' . $members . '
';
if ($result['description'] != '') {
- $item_3 = '
'.cut($result['description'],100,true).'
';
+ $html .= '
' . cut($result['description'],100,true) . '
';
} else {
- $item_2 = '
';
- $item_3 = '
';
+ $html .= '';
}
- $grid_item_2 = $item_0.$item_1.$item_2.$item_3;
+ $html .= '
';
+ $html .= '
';
+
+ $grid_item_2 = $html;
$grid_my_groups[]= array($grid_item_2);
}
}
@@ -107,8 +114,8 @@ foreach ($results as $result) {
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
$result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
$id = $result['id'];
- $url_open = '';
- $url_close = '';
+ $name = cut($result['name'], GROUP_TITLE_LENGTH, true);
+
$count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000));
if ($count_users_group == 1 ) {
$count_users_group = $count_users_group.' '.get_lang('Member');
@@ -116,30 +123,38 @@ foreach ($results as $result) {
$count_users_group = $count_users_group.' '.get_lang('Members');
}
- $name = cut($result['name'],GROUP_TITLE_LENGTH,true);
+ $url = '' . $name . '';
+
$picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
$result['picture'] = '
';
-
- $item_0 = Display::div($result['picture'], array('class'=>'box_description_group_image'));
- $members = Display::span($count_users_group, array('class'=>'box_description_group_member'));
- $item_1 = Display::div(Display::tag('h4', $url_open.$name.$url_close).$members, array('class'=>'box_description_group_title'));
- $item_2 = '';
- $item_3 = '';
-
+ $members = Display::returnFontAwesomeIcon('user').$count_users_group;
+
+ $html = '';
+ $html .= '
';
+ $html .= $result['picture'];
+ $html .= '
';
+ $html .= '
';
+ $html .= '
';
+ $html .= Display::tag('h5', $url);
+ $html .= '
';
+ $html .= '
' . $members . '
';
if ($result['description'] != '') {
- $item_3 = '
'.cut($result['description'],100,true).'
';
+ $html .= '
' . cut($result['description'],100,true) . '
';
} else {
- $item_2 = '
';
- $item_3 = '
';
+ $html .= '';
}
//Avoiding my groups
- $join_url = '';
+
if (!in_array($id,$my_group_list)) {
- $join_url = '
'.get_lang('JoinGroup').' ';
+ $html .= '
'.get_lang('JoinGroup').' ';
}
-
- $item_4 = '
'.$join_url.'
';
- $grid_item_2 = $item_0.$item_1.$item_2.$item_3.$item_4;
+
+ $html .= '
'.$join_url.'
';
+ $html .= '
';
+ $html .= '
';
+
+
+ $grid_item_2 = $html;
$grid_newest_groups[]= array($grid_item_2);
}
@@ -153,8 +168,7 @@ if (is_array($results) && count($results) > 0) {
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
$result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
$id = $result['id'];
- $url_open = '';
- $url_close = '';
+ $name = cut($result['name'],GROUP_TITLE_LENGTH,true);
$count_users_group = count($usergroup->get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000));
if ($count_users_group == 1 ) {
@@ -163,28 +177,36 @@ if (is_array($results) && count($results) > 0) {
$count_users_group = $count_users_group.' '.get_lang('Members');
}
- $name = cut($result['name'],GROUP_TITLE_LENGTH,true);
+ $url = '' . $name . '';
+
$picture = $usergroup->get_picture_group($result['id'], $result['picture'],80);
$result['picture'] = '
';
- $item_0 = Display::div($result['picture'], array('class'=>'box_description_group_image'));
- $members = Display::span($count_users_group, array('class'=>'box_description_group_member'));
- $item_1 = Display::div(Display::tag('h4', $url_open.$name.$url_close).$members, array('class'=>'box_description_group_title'));
-
+ $html = '';
+ $html .= '
';
+ $html .= $result['picture'];
+ $html .= '
';
+ $html .= '
';
+ $html .= '
';
+ $html .= Display::tag('h5', $url);
+ $html .= '
';
+ $html .= '
' . $members . '
';
if ($result['description'] != '') {
- $item_3 = '
'.cut($result['description'],100,true).'
';
+ $html .= '
' . cut($result['description'],100,true) . '
';
} else {
- $item_2 = '
';
- $item_3 = '
';
+ $html .= '';
}
+ //Avoiding my groups
- $join_url = '';
if (!in_array($id,$my_group_list)) {
- $join_url = '
'.get_lang('JoinGroup').' ';
+ $html .= '
'.get_lang('JoinGroup').' ';
}
- $item_4 = '
'.$join_url.'
';
- $grid_item_2 = $item_0.$item_1.$item_2.$item_3.$item_4;
+ $html .= '
'.$join_url.'
';
+ $html .= '
';
+ $html .= '
';
+
+ $grid_item_2 = $html;
$grid_pop_groups[]= array($grid_item_2);
}
}
diff --git a/main/template/default/social/group_view.tpl b/main/template/default/social/group_view.tpl
index 6c08ac1062..45642273d8 100644
--- a/main/template/default/social/group_view.tpl
+++ b/main/template/default/social/group_view.tpl
@@ -3,7 +3,7 @@
{% block content %}
-
+
{{ social_avatar_block }}
{{ social_menu_block }}
diff --git a/main/template/default/social/groups.tpl b/main/template/default/social/groups.tpl
index 95eeb92f76..ce2141a36b 100644
--- a/main/template/default/social/groups.tpl
+++ b/main/template/default/social/groups.tpl
@@ -8,18 +8,8 @@
{{ social_menu_block }}
-
-
-
- {{ social_right_content }}
-
-
- {{ social_auto_extend_link }}
+
+ {{ social_right_content }}
-
{% endblock %}