Split social_left_content in blocks at tpl level in messaging tool - refs #5637

1.9.x
Yannick Warnier 10 years ago
parent e7b098c200
commit 61caa00b19
  1. 6
      main/messages/inbox.php
  2. 6
      main/messages/new_message.php
  3. 6
      main/messages/outbox.php
  4. 6
      main/messages/view_message.php

@ -129,7 +129,8 @@ if (isset($_GET['f']) && $_GET['f'] == 'social' || api_get_setting('allow_social
//LEFT CONTENT
if (api_get_setting('allow_social_tool') == 'true') {
$social_left_content = SocialManager::show_social_menu('messages');
$social_avatar_block = SocialManager::show_social_avatar_block('messages');
$social_menu_block = SocialManager::show_social_menu('messages');
}
//Right content
@ -165,7 +166,8 @@ if (api_get_setting('allow_social_tool') == 'true') {
$tpl = new Template(null);
if (api_get_setting('allow_social_tool') == 'true') {
$tpl->assign('social_left_content', $social_left_content);
$tpl->assign('social_avatar_block', $social_avatar_block);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);

@ -305,7 +305,8 @@ if ($group_id != 0) {
// LEFT COLUMN
$social_left_content = null;
if (api_get_setting('allow_social_tool') == 'true') {
$social_left_content = SocialManager::show_social_menu('messages');
$social_avatar_block = SocialManager::show_social_avatar_block('messages');
$social_menu_block = SocialManager::show_social_menu('messages');
$social_right_content .= '<div class="span9">';
$social_right_content .= '<div class="actions">';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('back.png', get_lang('Back'), array(), 32).'</a>';
@ -362,7 +363,8 @@ if (api_get_setting('allow_social_tool') == 'true') {
$tpl = new Template(get_lang('ComposeMessage'));
if (api_get_setting('allow_social_tool') == 'true') {
$tpl->assign('social_left_content', $social_left_content);
$tpl->assign('social_avatar_block', $social_avatar_block);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);

@ -108,7 +108,8 @@ if (isset($_REQUEST['action'])) {
$social_right_content = '';
if (api_get_setting('allow_social_tool') == 'true') {
$social_left_content = SocialManager::show_social_menu('messages');
$social_avatar_block = SocialManager::show_social_avatar_block('messages');
$social_menu_block = SocialManager::show_social_menu('messages');
$social_right_content .= '<div class="span9">';
$social_right_content .= '<div class="actions">';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('back.png', get_lang('Back'), array(), 32).'</a>';
@ -147,7 +148,8 @@ if (api_get_setting('allow_social_tool') == 'true') {
$tpl = new Template(get_lang('ComposeMessage'));
if (api_get_setting('allow_social_tool') == 'true') {
$tpl->assign('social_left_content', $social_left_content);
$tpl->assign('social_avatar_block', $social_avatar_block);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);

@ -54,7 +54,8 @@ $message = '';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') == 'true') {
$social_left_content = SocialManager::show_social_menu($show_menu);
$social_avatar_block = SocialManager::show_social_avatar_block($show_menu);
$social_menu_block = SocialManager::show_social_menu($show_menu);
$message .='<div class="span9">';
}
//MAIN CONTENT
@ -71,7 +72,8 @@ if (!empty($message)) {
}
$tpl = new Template(get_lang('View'));
if (api_get_setting('allow_social_tool') == 'true') {
$tpl->assign('social_left_content', $social_left_content);
$tpl->assign('social_avatar_block', $social_avatar_block);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);

Loading…
Cancel
Save