1.10.x
Julio Montoya 11 years ago
parent b6dbe67d2b
commit d8c44fc49c
  1. 6
      main/inc/lib/message.lib.php
  2. 23
      main/inc/lib/social.lib.php
  3. 2
      main/social/group_topics.php
  4. 17
      main/social/groups.php
  5. 8
      main/template/default/social/groups.tpl
  6. 2
      main/work/work.lib.php

@ -1075,7 +1075,7 @@ class MessageManager
$items = $topic['count'];
$reply_label = ($items == 1) ? get_lang('GroupReply') : get_lang('GroupReplies');
$html .= '<div class="span1">';
$html .= '<div class="col-md-1">';
$html .= Display::div(Display::tag('span', $items).$reply_label, array('class' => 'group_discussions_replies'));
$html .= '</div>';
@ -1085,7 +1085,7 @@ class MessageManager
$topic['title'] = get_lang('Untitled');
}
$html .= '<div class="span4">';
$html .= '<div class="col-md-4">';
$html .= Display::tag('h4', Display::url(Security::remove_XSS($topic['title'], STUDENT, true), 'group_topics.php?id='.$group_id.'&topic_id='.$topic['id']));
if ($my_group_role == GROUP_USER_PERMISSION_ADMIN ||
@ -1113,7 +1113,7 @@ class MessageManager
$user_info .= '<div class="message-group-author"><img src="'.$image.'" alt="'.$name.'" width="32" height="32" title="'.$name.'" /></div>';
$user_info .= '</td>';
$html .= '<div class="span2">';
$html .= '<div class="col-md-2">';
$html .= $user_info;
$html .= '</div>';
$html .= '</div>';

@ -563,7 +563,17 @@ class SocialManager extends UserManager
/**
* Shows the avatar block in social pages
*
* @param string highlight link possible values: group_add, home, messages, messages_inbox, messages_compose ,messages_outbox ,invitations, shared_profile, friends, groups search
* @param string highlight link possible values:
* group_add,
* home,
* messages,
* messages_inbox,
* messages_compose,
* messages_outbox,
* invitations,
* shared_profile,
* friends,
* groups search
* @param int group id
* @param int user id
*
@ -599,10 +609,14 @@ class SocialManager extends UserManager
$html = '<div class="avatar-profile">';
if (in_array($show, $show_groups) && !empty($group_id)) {
//--- Group image
// Group image
$group_info = GroupPortalManager::get_group_data($group_id);
$big = GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'], 160, GROUP_IMAGE_SIZE_BIG);
$big = GroupPortalManager::get_picture_group(
$group_id,
$group_info['picture_uri'],
160,
GROUP_IMAGE_SIZE_BIG
);
$html .= Display::url('<img src='.$big['file'].' class="social-groups-image" /> </a><br /><br />', api_get_path(WEB_CODE_PATH).'social/groups.php?id='.$group_id);
if (GroupPortalManager::is_group_admin($group_id, api_get_user_id())) {
@ -1503,6 +1517,7 @@ class SocialManager extends UserManager
if (api_get_setting('allow_social_tool') != 'true') {
return '';
}
$socialAvatarBlock = SocialManager::show_social_avatar_block($groupBlock, $groupId, $userId);
$profileEditionLink = null;

@ -49,6 +49,8 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
}
}
$content = null;
// save message group
if (isset($_POST['token']) && $_POST['token'] === $_SESSION['sec_token']) {

@ -85,8 +85,8 @@ jQuery(document).ready(function() {
window.location.href=ui.tab;
});
$("#tabs").tabs();
$("#tab_browse").tabs();
/*$("#tabs").tabs();
$("#tab_browse").tabs();*/
var valor = "' . $anchor . '";
$(".head").click(function() {
@ -221,7 +221,8 @@ $tpl = new Template();
$create_thread_link = '';
$userInfo = api_get_user_info(api_get_user_id(), true);
if ($group_id != 0) {
if (!empty($group_id)) {
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
//Block Social Menu
$social_menu_block = SocialManager::show_social_menu('groups', $group_id);
@ -277,7 +278,7 @@ if ($group_id != 0) {
$is_group_member = GroupPortalManager::is_group_member($group_id);
// details about the current group
$social_right_content = '<div class="span9">';
$social_right_content = '<div class="col-md-12">';
$social_right_content .= '<div id="social-group-details">';
//Group's title
$social_right_content .= Display::tag(
@ -319,7 +320,7 @@ if ($group_id != 0) {
$social_right_content .= '</div>';
//-- Show message groups
$social_right_content .= '<div class="span9">';
$social_right_content .= '<div class="col-md-12">';
if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
if (!$is_group_member) {
@ -447,7 +448,7 @@ if ($group_id != 0) {
$social_right_content .= '</div>'; // end layout messages
} else {
// My groups -----
// My groups
$results = GroupPortalManager::get_groups_by_user(api_get_user_id(), 0);
$grid_my_groups = array();
$my_group_list = array();
@ -848,7 +849,7 @@ if ($group_id != 0) {
if (!empty($create_group_item)) {
$social_right_content .= Display::div(
$create_group_item,
array('class' => 'span9')
array('class' => 'col-md-12')
);
}
$headers = array(
@ -856,7 +857,7 @@ if ($group_id != 0) {
get_lang('Popular'),
get_lang('MyGroups')
);
$social_right_content .= '<div class="span9">' . Display::tabs(
$social_right_content .= '<div class="col-md-12">' . Display::tabs(
$headers,
array($newest_content, $popular_content, $my_group_content),
'tab_browse'

@ -8,7 +8,7 @@
{{ social_menu_block }}
</div>
</div>
<div id="wallMessages" class="col-md-5" style="min-height:1px">
<div class="col-md-9" style="min-height:1px">
<div class="row">
<div class="col-md-12">
<div id="message_ajax_reponse" class=""></div>
@ -20,10 +20,6 @@
<div id="display_response_id" class="col-md-5"></div>
{{ social_auto_extend_link }}
</div>
<div class="col-md-4">
<div class="row">
{{ social_right_information }}
</div>
</div>
</div>
{% endblock %}

@ -3681,7 +3681,7 @@ function setWorkUploadForm($form, $uploadFormType = 0)
break;
}
$form->addButtonUpload(get_lang('Send'), 'submitWork');
$form->addButtonUpload(get_lang('Upload'), 'submitWork');
}
/**

Loading…
Cancel
Save