From af344efda7459245fb8d01c80f1824cca3e0cdb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Arag=C3=B3n?= Date: Mon, 2 Apr 2018 15:28:03 -0500 Subject: [PATCH] fix home welcome --- app/Resources/public/css/base.css | 7 +- .../public/css/themes/chamilo/default.css | 2 +- index.php | 4 +- main/inc/lib/userportal.lib.php | 115 +++++++++++------- main/template/default/layout/layout_2_col.tpl | 6 +- 5 files changed, 83 insertions(+), 51 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index d024f028a9..d6b349fdc8 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -5206,7 +5206,7 @@ div#chat-remote-video video { position: absolute; bottom: 0px; right: -10px; - background-color: #9ec6d0a8; + background-color: #fd6600; color: #fff; padding: 5px 10px; font-size: 10px; @@ -5223,7 +5223,7 @@ div#chat-remote-video video { .grid-courses .items .cribbon{ width: 0; height: 0; - border-top: 10px solid #337AB7; + border-top: 10px solid #333333; border-right: 10px solid transparent; position: absolute; bottom: -10px; @@ -6526,9 +6526,10 @@ ul#toolnavbox-two li a.btn{ margin-right: 10px; vertical-align: middle; } -#homepage-home, .welcome-home-top-temp{ +#home-welcome{ display: block; width: 100%; + margin-bottom: 20px; } .label-subscribed{ font-size: 12px; diff --git a/app/Resources/public/css/themes/chamilo/default.css b/app/Resources/public/css/themes/chamilo/default.css index 11fa9c003e..4145052afe 100755 --- a/app/Resources/public/css/themes/chamilo/default.css +++ b/app/Resources/public/css/themes/chamilo/default.css @@ -35,7 +35,7 @@ body { } a { - color: #0099FF; + color: #337AB7; text-decoration: none; } a:hover, diff --git a/index.php b/index.php index 0b6cd69b19..6e60d8fa4e 100755 --- a/index.php +++ b/index.php @@ -1,5 +1,6 @@ tpl->assign('hot_courses', $hotCourses); $controller->tpl->assign('announcements_block', $announcements_block); -$controller->tpl->assign('home_page_block', $controller->return_home_page()); +$controller->tpl->assign('home_welcome', $controller->return_home_page()); $controller->tpl->assign('navigation_course_links', $controller->return_navigation_links()); $controller->tpl->assign('notice_block', $controller->return_notice()); //$controller->tpl->assign('main_navigation_block', $controller->return_navigation_links()); diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index 5bacbfa3fe..f169bb990c 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -87,7 +87,9 @@ class IndexManager $my_exercise = $exercise_list[0]; $url = Display::url( $my_exercise['title'], - api_get_path(WEB_CODE_PATH).'exercise/overview.php?exerciseId='.$my_exercise['id'].'&cidReq='.$my_exercise['course_code'].'&id_session='.$my_exercise['session_id'] + api_get_path( + WEB_CODE_PATH + ).'exercise/overview.php?exerciseId='.$my_exercise['id'].'&cidReq='.$my_exercise['course_code'].'&id_session='.$my_exercise['session_id'] ); $this->tpl->assign('exercise_url', $url); $this->tpl->assign( @@ -146,7 +148,7 @@ class IndexManager /** * Alias for the online_logout() function. * - * @param bool $redirect Whether to ask online_logout to redirect to index.php or not + * @param bool $redirect Whether to ask online_logout to redirect to index.php or not * @param array $logoutInfo Information stored by local.inc.php before new context ['uid'=> x, 'cid'=>y, 'sid'=>z] */ public function logout($redirect = true, $logoutInfo = []) @@ -228,7 +230,9 @@ class IndexManager if ($show_create_link) { $html .= '
  • ' .Display::return_icon('new-course.png', get_lang('CourseCreate')) - .(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')) + .(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang( + 'CourseCreate' + )) .'
  • '; } @@ -239,7 +243,9 @@ class IndexManager .get_lang('CourseCatalog') .''; } else { - $html .= '
  • '.get_lang('Dashboard').'
  • '; + $html .= '
  • '.get_lang( + 'Dashboard' + ).'
  • '; } } $html .= ''; @@ -270,7 +276,7 @@ class IndexManager // Including the page for the news $html = ''; if (!empty($_GET['include']) && preg_match('/^[a-zA-Z0-9_-]*\.html$/', $_GET['include'])) { - $open = @(string) file_get_contents($this->home.$_GET['include']); + $open = @(string)file_get_contents($this->home.$_GET['include']); $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); } else { // Hiding home top when user not connected. @@ -305,9 +311,9 @@ class IndexManager } if (trim($home_top_temp) == '' && api_is_platform_admin()) { - $home_top_temp = '
    '.get_lang('PortalHomepageDefaultIntroduction').'
    '; + $home_top_temp = get_lang('PortalHomepageDefaultIntroduction'); } else { - $home_top_temp = '
    '.$home_top_temp.'
    '; + $home_top_temp; } $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); @@ -324,9 +330,9 @@ class IndexManager $user_selected_language = api_get_interface_language(); $html = ''; // Notice - $home_notice = @(string) file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); + $home_notice = @(string)file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); if (empty($home_notice)) { - $home_notice = @(string) file_get_contents($this->home.'home_notice.html'); + $home_notice = @(string)file_get_contents($this->home.'home_notice.html'); } if (!empty($home_notice)) { $home_notice = api_to_system_encoding($home_notice, api_detect_encoding(strip_tags($home_notice))); @@ -358,7 +364,7 @@ class IndexManager } $html = ''; - $home_menu = @(string) file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); + $home_menu = @(string)file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); if (!empty($home_menu)) { $home_menu_content = '