More minor UI fixes

skala
Julio Montoya 14 years ago
parent f331cd5ce3
commit 8ba9a79fc7
  1. 2
      main/admin/settings.lib.php
  2. 7
      main/admin/settings.php
  3. 6
      main/inc/lib/database.lib.php
  4. 14
      main/social/home.php
  5. 67
      main/social/profile.php

@ -1358,8 +1358,6 @@ function generate_settings_form($settings, $settings_by_access_list) {
$form->addElement('html', '</div>');
$form->setDefaults($default_values);
}
return $form;
}

@ -136,8 +136,9 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
}
if (isset($_GET['category']) && $_GET['category'] == 'search_setting') {
if (!empty($_REQUEST['search_field']))
$settings = search_setting($_REQUEST['search_field']);
if (!empty($_REQUEST['search_field'])) {
$settings = search_setting($_REQUEST['search_field']);
}
}
$form = generate_settings_form($settings, $settings_by_access_list);
@ -360,7 +361,7 @@ echo "</div>";
$form_search = new FormValidator('search_settings', 'get', api_get_self() , null, array('class'=>'vertical'));
$form_search->addElement('text', 'search_field');
$form_search->addElement('hidden', 'category', 'search_setting');
$form_search->addElement('style_submit_button', 'submit_button', get_lang('Search'), 'value="submit_button", class="save"');
$form_search->addElement('style_submit_button', 'submit_button', get_lang('Search'), 'value="submit_button", class="search"');
$form_search->setDefaults(array('search_field' => $_REQUEST['search_field']));
$form_search->display();

@ -710,10 +710,14 @@ class Database {
$connection = null;
}
//error_log($query);
//@todo remove this before the stable release
//Check if the table contains a c_ (means a course id)
if (strpos($query, 'c_')) {
//Check if the table contains inner joins
if (
if (
strpos($query, 'wcag_anysurfer_public_pages') === false &&
strpos($query, 'specific_field') === false &&
strpos($query, 'down_doc_path') === false &&
strpos($query, 'INNER JOIN') === false &&

@ -69,7 +69,7 @@ $user_info = UserManager :: get_user_info_by_id(api_get_user_id());
$social_left_content = SocialManager::show_social_menu('home');
$social_right_content .= '<div class="row"><div class="social_user_information span5">';
$social_right_content .= '<div class="row"><div class="social_user_information span4">';
$social_right_content .= '<div class="social-groups-home-title">'.get_lang('ContactInformation').'</div>';
@ -102,11 +102,9 @@ $social_left_content = SocialManager::show_social_menu('home');
$url = api_get_path(WEB_CODE_PATH).'social/skills_tree.php';
$social_right_content .= Display::url(get_lang('ViewSkillsTree'), $url);
$social_right_content .= '</div>';
//Search box
$social_right_content .= '<div class="span6">';
$social_right_content .= '<div class="span4">';
$social_right_content .= UserManager::get_search_form('');
$social_right_content .= '<br />';
@ -129,8 +127,8 @@ $social_left_content = SocialManager::show_social_menu('home');
$result['name'] = Display::url(api_ucwords(cut($result['name'],40,true)), $group_url).Display::span('<br />'.$result['count'],array('class'=>'box_description_group_member'));
$picture = GroupPortalManager::get_picture_group($id, $result['picture_uri'],80);
$result['picture_uri'] = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="10" height="44" border="2" align="left" width="44" />';
$actions = '<div class="box_description_group_actions"><a href="groups.php?#tab_browse-2">'.get_lang('SeeMore').'</a></div>';
$groups_newest[]= array(Display::url($result['picture_uri'], $group_url), $result['name'], cut($result['description'],120,true).$actions);
$group_actions = '<div class="box_description_group_actions"><a href="groups.php?#tab_browse-2">'.get_lang('SeeMore').'</a></div>';
$groups_newest[]= array(Display::url($result['picture_uri'], $group_url), $result['name'], cut($result['description'],120,true).$group_actions);
}
}
@ -151,8 +149,8 @@ $social_left_content = SocialManager::show_social_menu('home');
$result['name'] = Display::url(api_ucwords(cut($result['name'],40,true)), $group_url).Display::span('<br />'.$result['count'],array('class'=>'box_description_group_member'));
$picture = GroupPortalManager::get_picture_group($id, $result['picture_uri'],80);
$result['picture_uri'] = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="10" height="44" border="2" align="left" width="44" />';
$actions = '<div class="box_description_group_actions" ><a href="groups.php?#tab_browse-3">'.get_lang('SeeMore').'</a></div>';
$groups_pop[]= array(Display::url($result['picture_uri'], $group_url) , $result['name'], cut($result['description'],120,true).$actions);
$group_actions = '<div class="box_description_group_actions" ><a href="groups.php?#tab_browse-3">'.get_lang('SeeMore').'</a></div>';
$groups_pop[]= array(Display::url($result['picture_uri'], $group_url) , $result['name'], cut($result['description'],120,true).$group_actions);
}
if (count($groups_newest) > 0) {

@ -56,7 +56,6 @@ if (isset($_GET['u'])) {
} else {
$user_info = UserManager::get_user_info_by_id($user_id);
}
$libpath = api_get_path(LIBRARY_PATH);
require_once api_get_path(SYS_CODE_PATH).'calendar/myagenda.inc.php';
require_once api_get_path(SYS_CODE_PATH).'announcements/announcements.inc.php';
@ -227,7 +226,7 @@ if (is_array($personal_course_list)) {
}
$social_left_content = SocialManager::show_social_menu('shared_profile', null, $user_id, $show_full_profile);
$social_right_content = '<div class="row"><div class="rounded_div span5">';
$social_right_content = '<div class="row"><div class="rounded_div span4">';
if (!empty($user_info['firstname']) || !empty($user_info['lastname'])) {
$social_right_content .= '<div><h3>'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</h3></div>';
@ -379,9 +378,9 @@ if ($show_full_profile) {
if (isset($friends[$k])) {
$friend = $friends[$k];
$name_user = api_get_person_name($friend['firstName'], $friend['lastName']);
$user_info = api_get_user_info($friend['friend_user_id'], true);
$user_info_friend = api_get_user_info($friend['friend_user_id'], true);
if ($user_info['user_is_online']) {
if ($user_info_friend['user_is_online']) {
$status_icon = Display::div('', array('class' => 'online_user'));
} else {
$status_icon = Display::div('', array('class' => 'offline_user'));
@ -458,7 +457,7 @@ if ($show_full_profile) {
}
if (count($grid_my_groups) > 0) {
$social_right_content .= '<div class="rounded_div span10" >';
$social_right_content .= '<div class="rounded_div span8" >';
$count_groups = 0;
if (count($results) == 1 ) {
$count_groups = count($results);
@ -489,7 +488,7 @@ if ($show_full_profile) {
// COURSES LIST
if ( is_array($list) ) {
$social_right_content .= '<div class="rounded_div span10">';
$social_right_content .= '<div class="rounded_div span8">';
$social_right_content .= '<div><h3>'.api_ucfirst(get_lang('MyCourses')).'</h3></div>';
$social_right_content .= '<div class="social-content-training">';
//Courses whithout sessions
@ -513,10 +512,11 @@ if ($show_full_profile) {
$social_right_content .= '</div>'; //social-content-training
$social_right_content .= '</div>'; //close rounded
}
// user feeds
$user_feeds = SocialManager::get_user_feeds($user_id);
if (!empty($user_feeds)) {
$social_right_content .= '<div class="rounded_div" style="width:90%">';
$social_right_content .= '<div class="rounded_div span8">';
$social_right_content .= '<div><h3>'.get_lang('RSSFeeds').'</h3></div>';
$social_right_content .= '<div class="social-content-training">'.$user_feeds.'</div>';
$social_right_content .= '</div>';
@ -540,14 +540,13 @@ if ($show_full_profile) {
$count_pending_invitations = count($pending_invitations);
}
$social_right_content .= '<div class="social-box-main1">';
if (!empty($production_list) || !empty($file_list) || $count_pending_invitations > 0) {
//Pending invitations
if (!isset($_GET['u']) || (isset($_GET['u']) && $_GET['u']==api_get_user_id())) {
if ($count_pending_invitations > 0) {
$social_right_content .= '<div class="rounded_div" style="width:280px">';
$social_right_content .= '<div class="rounded_div span4">';
$social_right_content .= '<div><h3>'.get_lang('PendingInvitations').'</h3></div>';
for ($i=0;$i<$count_pending_invitations;$i++) {
$user_invitation_id = $pending_invitations[$i]['user_sender_id'];
@ -575,59 +574,53 @@ if ($show_full_profile) {
//--Productions
$production_list = UserManager::build_production_list($user_id);
$product_content = '';
if (!empty($production_list)) {
$product_content .= '<div><h3>'.get_lang('MyProductions').'</h3></div>';
$product_content .= '<div class="rounded1">';
if (!empty($production_list)) {
$product_content .= '<div class="rounded_div span4">';
$product_content .= '<div><h3>'.get_lang('MyProductions').'</h3></div>';
$product_content .= $production_list;
$product_content .= '</div>';
}
// Images uploaded by course
if (!empty($file_list)) {
$product_content .= '<div class="rounded_div span4">';
$product_content .= '<div><h3>'.get_lang('ImagesUploaded').'</h3></div>';
$product_content .= '<div class="social-content-information">';
$product_content .= $file_list;
$product_content .= '</div>';
}
if (!empty($product_content)) {
$social_right_content .= '<div class="rounded_div" style="width:280px">';
$social_right_content .= $product_content;
$social_right_content .= '</div>'; // close rounded
}
$product_content .= '</div>';
}
$social_right_content .= $product_content;
}
if (!empty($user_info['competences']) || !empty($user_info['diplomas']) || !empty($user_info['openarea']) || !empty($user_info['teach']) ) {
$social_right_content .= '<div class="rounded_div" style="width:280px">';
$social_right_content .= '<div class="rounded_div span4">';
$social_right_content .= '<div><h3>'.get_lang('MoreInformation').'</h3></div>';
$cut_size = 220;
if (!empty($user_info['competences'])) {
$social_right_content .= '<br />';
$social_right_content .= '<div class="social-background-content" style="width:100%;">';
$social_right_content .= '<br />';
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyCompetences').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['competences'].'</div>';
$social_right_content .= '</div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['competences'].'</div>';
$social_right_content .= '<br />';
}
if (!empty($user_info['diplomas'])) {
$social_right_content .= '<div class="social-background-content" style="width:100%;" >';
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['diplomas'].'</div>';
$social_right_content .= '</div>';
if (!empty($user_info['diplomas'])) {
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['diplomas'].'</div>';
$social_right_content .= '<br />';
}
if (!empty($user_info['openarea'])) {
$social_right_content .= '<div class="social-background-content" style="width:100%;" >';
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['openarea'].'</div>';
$social_right_content .= '</div>';
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['openarea'].'</div>';
$social_right_content .= '<br />';
}
if (!empty($user_info['teach'])) {
$social_right_content .= '<div class="social-background-content" style="width:100%;" >';
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyTeach').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['teach'].'</div>';
$social_right_content .= '</div>';
if (!empty($user_info['teach'])) {
$social_right_content .= '<div class="social-actions-message"><strong>'.get_lang('MyTeach').'</strong></div>';
$social_right_content .= '<div class="social-profile-extended">'.$user_info['teach'].'</div>';
$social_right_content .= '<br />';
}
$social_right_content .= '</div>'; //rounded

Loading…
Cancel
Save