Improving bread crumbs + adding funcions in the banner.inc file with see #3329

skala
Julio Montoya 14 years ago
parent 9b7cc8ea5b
commit fd2c60b4f6
  1. 4
      main/css/academica/default.css
  2. 4
      main/css/baby_orange/default.css
  3. 41
      main/css/base.css
  4. 4
      main/css/blue_lagoon/default.css
  5. 1
      main/css/chamilo/default.css
  6. 4
      main/css/cool_blue/default.css
  7. 4
      main/css/corporate/default.css
  8. 5
      main/css/cosmic_campus/default.css
  9. BIN
      main/css/crumbs.gif
  10. 4
      main/css/delicious_bordeaux/default.css
  11. 4
      main/css/dokeos_blue/default.css
  12. 3
      main/css/dokeos_classic/default.css
  13. 3
      main/css/dokeos_classic_2D/default.css
  14. 5
      main/css/empire_green/default.css
  15. 4
      main/css/fruity_orange/default.css
  16. 2
      main/css/medical/default.css
  17. 2
      main/css/medical/images/default.css
  18. 4
      main/css/public_admin/default.css
  19. 2
      main/css/royal_purple/default.css
  20. 4
      main/css/sober_brown/default.css
  21. 6
      main/css/steel_grey/default.css
  22. 4
      main/css/tasty_olive/default.css
  23. 309
      main/inc/banner.inc.php

@ -113,6 +113,8 @@ input[type=button], input[type=submit] {
font-weight: bold;
margin: 0;
padding: 0;
float:left;
width:100%;
}
#header3 UL {
@ -178,6 +180,8 @@ input[type=button], input[type=submit] {
/* header 4 styles */
#header4 {
float:left;
width:100%;
background-color: #fff;
height: 21px;
}

@ -106,6 +106,8 @@ input[type=button], input[type=submit] {
font-weight: bold;
margin: 0;
padding: 0;
float:left;
width:100%;
}
#header3 ul {
list-style:none;
@ -168,6 +170,8 @@ input[type=button], input[type=submit] {
#header4 {
background-color: #fff;
height: 21px;
float:left;
width:100%;
}
a.breadcrumb {
height: 21px;

@ -408,3 +408,44 @@ table.lp_build td.tree {
height: 100px;
}
/* Breadcrumb */
.bread {
//border: 1px solid #DEDEDE;
height: 25px;
margin: 0px;
padding:0px 0px 0px 12px;
}
.bread li {
color: #777777;
float: left;
line-height: 25px;
padding-left: 0.75em;
}
.bread a {
display: block;
font-size:11px;
padding: 0 15px 0 10px;
}
.bread a:hover {
color:#35acc5;
}
.bread li {
background: url("crumbs.gif") no-repeat scroll right center transparent;
display: block;
padding: 0 15px 0 0;
background-repeat:no-repeat;
background-position:right;
}
#logo {
height:85px;
overflow:hidden;
margin-left:4%;
}

@ -387,6 +387,8 @@ select, input[type=checkbox], input[type=radio], input[type=button], input[type=
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -476,6 +478,8 @@ select, input[type=checkbox], input[type=radio], input[type=button], input[type=
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -4479,3 +4479,4 @@ abbr {
background-color:#F00;
cursor: help;
}

@ -412,6 +412,8 @@ ul#navigation .help a{
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -501,6 +503,8 @@ ul#navigation .help a{
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -108,6 +108,8 @@ input[type=button], input[type=submit] {
color: #333;
height:auto;
font-weight: bold;
float:left;
width:100%;
}
@ -192,6 +194,8 @@ input[type=button], input[type=submit] {
#header4 {
margin-left: 5px;
height: 21px;
float:left;
width:100%;
}
a.breadcrumb {
height: 21px;

@ -128,6 +128,8 @@ input[type=button], input[type=submit] {
height:25px;
margin-bottom: 1px;
background-image: url(images/fondoHeader3.jpg);
float:left;
width:100%;
}
#header3 a {
padding: 10px 0px 20px 0px;
@ -188,8 +190,9 @@ input[type=button], input[type=submit] {
margin-top: 0px;
margin-left: 18px;
position:relative;
float: left;
clear:left;
float:left;
width:100%;
}
#header4 a {
color: #7171b7;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -427,6 +427,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -516,6 +518,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -412,6 +412,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -501,6 +503,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -445,6 +445,8 @@ input[text] {
border-bottom: 1px solid #4171b5;
height:auto;
margin-bottom: 1px;
float:left;
width:100%;
}
#header3 a {
PADDING-RIGHT: 15px;
@ -549,6 +551,7 @@ input[text] {
padding-left: 21px;
margin-bottom: 2px;
float:left;
width:100%;
clear:right;
}
#header4 a {

@ -428,6 +428,8 @@ ul#navigation .student-connect a {
margin: 0px;
margin-bottom: 1px;
padding: 0em 0em 0.4em 0em;
float:left;
width:100%;
}
#header3 a {
color: #2754AF;
@ -515,6 +517,7 @@ ul#navigation .student-connect a {
margin-bottom: 2px;
padding: 4px;
float:left;
width:100%;
clear:right;
}
#header4 a {

@ -427,6 +427,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -516,6 +518,9 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -427,6 +427,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -516,6 +518,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -567,7 +567,9 @@ input[text] {
padding: 4px;
margin-bottom: 2px;
padding-left: 22px;
float:left;
width:100%;
clear:right;
}
#header4 a {

@ -285,6 +285,8 @@ input[text] {font-size: 12px; }
height:25px;
margin-bottom: 1px;
background-image: url(Images/fondoHeader3.jpg);
float:left;
width:100%;
}
#header3 A {

@ -481,6 +481,8 @@ select, input[type=checkbox], input[type=radio], input[type=button], input[type=
height:25px;
margin-bottom: 1px;
background-image: url(images/fondoHeader3.jpg);
float:left;
width:100%;
}
#header3 A {
PADDING-RIGHT: 15px;
@ -569,7 +571,9 @@ select, input[type=checkbox], input[type=radio], input[type=button], input[type=
padding: 4px;
padding-left: 20px;
margin-bottom: 2px;
float:left;
width:100%;
clear:right;
}
#header4 a {

@ -427,6 +427,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;

@ -466,6 +466,8 @@ input[text] {
border-bottom: 1px solid #aeaeae;
height:20px;
margin-bottom: 1px;
float:left;
width:100%;
}
#header3 A {
PADDING-RIGHT: 15px;
@ -555,7 +557,9 @@ input[text] {
padding: 4px;
margin-bottom: 2px;
padding-left: 20px;
float:left;
width:100%;
clear:right;
}
#header4 a {

@ -427,6 +427,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -516,6 +518,10 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -428,6 +428,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-position: 0px 0px;
background-repeat: repeat-x;/*border: 1px solid green;*/
height:41px;
float:left;
width:100%;
}
#header3 a {
DISPLAY: block;
@ -517,6 +519,8 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
padding-left: 21px;
margin-bottom: 2px;
clear:right;
float:left;
width:100%;
}
#header4 a {
color: #fff;

@ -12,10 +12,8 @@ require_once api_get_path(LIBRARY_PATH).'banner.lib.php';
$session_id = api_get_session_id();
$session_name = api_get_session_name($my_session_id);
echo '<div id="wrapper">';
?>
<div id="wrapper">
<ul id="navigation">
<?php
if (!empty($help)) {
@ -26,32 +24,33 @@ if (!empty($help)) {
if (api_get_setting('show_link_bug_notification') == 'true') {
?>
<li class="report"><a href="http://support.chamilo.org/projects/chamilo-18/wiki/How_to_report_bugs" target="_blank"><img src="<?php echo api_get_path(WEB_IMG_PATH) ?>bug.large.png" style="vertical-align: middle;" alt="<?php echo get_lang('ReportABug') ?>" title="<?php echo get_lang('ReportABug');?>"/></a></li>
</ul>
<?php
}
/*
<li class="student"> <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
<li class="user-online"> <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
<li class="user-connect"> <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
<li class="student-connect"> <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
<?php }
*/
?>
</ul>
<div id="header">
<div id="header1">
<div id="top_corner"></div>
<div id="institution">
<a href="<?php echo api_get_path(WEB_PATH); ?>index.php" target="_top"><?php echo api_get_setting('siteName'); ?></a>
<?php
echo '<div id="header">';
function show_header_1($language_file, $nameTools) {
$_course = api_get_course_info();
echo '<div id="header1">';
echo '<div id="top_corner"></div>';
$logo = api_get_path(SYS_CODE_PATH).'css/'.api_get_visual_theme().'/images/header-logo.png';
$site_name = api_get_setting('siteName');
if (file_exists($logo)) {
echo '<div id="logo">';
$image_url = api_get_path(WEB_CSS_PATH).api_get_visual_theme().'/images/header-logo.png';
$logo = Display::img($image_url, $site_name, array('title'=>$site_name));
echo Display::url($logo, api_get_path(WEB_PATH).'index.php');
echo '</div>';
} else {
echo '<a href="'.api_get_path(WEB_PATH).'index.php" target="_top">'.$site_name.'</a>';
$iurl = api_get_setting('InstitutionUrl');
$iname = api_get_setting('Institution');
if (!empty($iname)) {
echo '-&nbsp;<a href="'.$iurl.'" target="_top">'.$iname.'</a>';
}
/* External link section a.k.a Department - Department URL */
// External link section a.k.a Department - Department URL
if (isset($_course['extLink']) && $_course['extLink']['name'] != '') {
echo '<span class="extLinkSeparator"> - </span>';
if ($_course['extLink']['url'] != '') {
@ -62,16 +61,15 @@ if (api_get_setting('show_link_bug_notification') == 'true') {
echo $_course['extLink']['name'];
}
}
?>
</div>
<?php
}
/* Course title section */
if (!empty($_cid) and $_cid != -1 and isset($_course)) {
//Put the name of the course in the header
?>
<div id="my_courses">
<?php
echo '<div id="my_courses">';
/* <div id="my_courses"><a href="<?php echo api_get_path(WEB_COURSE_PATH).$_course['path']; ?>/index.php" target="_top">&nbsp;
echo $_course['name'].' ';
@ -92,13 +90,12 @@ if (!empty($_cid) and $_cid != -1 and isset($_course)) {
}
echo '</a>';*/
echo '</div>';
} elseif (isset($nameTools) && $language_file != 'course_home') {
//Put the name of the user-tools in the header
if (!isset($_user['user_id'])) {
echo '<div id="my_courses"></div>';
} elseif (!$noPHP_SELF) {
echo '<div id="my_courses"><a href="'.api_get_self().'?'.api_get_cidreq(), '" target="_top">', $nameTools, '</a></div>';
echo '<div id="my_courses"><a href="'.api_get_self().'?'.api_get_cidreq(), '" target="_top">'.$nameTools.'</a></div>';
} else {
echo '<div id="my_courses">'.$nameTools.'</div>';
}
@ -111,27 +108,30 @@ api_plugin('header');
echo '</div>';
//Don't let the header disappear if there's nothing on the left
echo '<div class="clear">&nbsp;</div>';
//echo '<div class="clear">&nbsp;</div>';
echo '</div>';
}
/* Plugins for banner section */
$web_course_path = api_get_path(WEB_COURSE_PATH);
?>
</div>
<div id="header2">
<div id="Header2Right">
<ul>
<?php
if ((api_get_setting('showonline', 'world') == 'true' AND !$_user['user_id']) OR (api_get_setting('showonline', 'users') == 'true' AND $_user['user_id']) OR (api_get_setting('showonline', 'course') == 'true' AND $_user['user_id'] AND $_cid)) {
function show_header_2($help) {
$_course = api_get_course_info();
$course_id = api_get_course_id();
$user_id = api_get_user_id();
echo '<div id="header2">';
echo '<div id="Header2Right">';
echo '<ul>';
if ((api_get_setting('showonline', 'world') == 'true' AND !$user_id) OR (api_get_setting('showonline', 'users') == 'true' AND $user_id) OR (api_get_setting('showonline', 'course') == 'true' AND $user_id AND $course_id)) {
$number = who_is_online_count(api_get_setting('time_limit_whosonline'));
$number_online_in_course = 0;
if(!empty($_course['id'])) {
$number_online_in_course = who_is_online_in_this_course_count(api_get_user_id(), api_get_setting('time_limit_whosonline'), $_course['id']);
$number_online_in_course = who_is_online_in_this_course_count($user_id, api_get_setting('time_limit_whosonline'), $_course['id']);
}
echo '<li>';
// Display the who's online of the platform
if ((api_get_setting('showonline', 'world') == 'true' AND !$_user['user_id']) OR (api_get_setting('showonline', 'users') == 'true' AND $_user['user_id'])) {
if ((api_get_setting('showonline', 'world') == 'true' AND !$user_id) OR (api_get_setting('showonline', 'users') == 'true' AND $user_id)) {
//echo '<a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_top" title="'.get_lang('UsersOnline').'" ><img width="12px" src="'.api_get_path(WEB_IMG_PATH).'online.png" title="'.get_lang('UsersOnline').'"> '.get_lang('OnLine').' '.$number.'</a>';
echo '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_top" title="'.get_lang('UsersOnline').'" ><img width="13px" src="'.api_get_path(WEB_IMG_PATH).'members.gif" title="'.get_lang('UsersOnline').'"> '.$number.'</a></li>';
}
@ -143,17 +143,16 @@ if ((api_get_setting('showonline', 'world') == 'true' AND !$_user['user_id']) OR
}
// Display the who's online for the session
//if (api_get_setting('use_session_mode') == 'true' && isset($_user['user_id']) && api_is_coach()) {
//if (api_get_setting('use_session_mode') == 'true' && isset($user_id) && api_is_coach()) {
if (api_get_setting('use_session_mode') == 'true' && isset($_user['user_id']) && api_get_session_id() != 0) {
//echo '<li><a href="'.api_get_path(WEB_PATH).'whoisonlinesession.php?id_coach='.$_user['user_id'].'&amp;referer='.urlencode($_SERVER['REQUEST_URI']).'" target="_top">'.get_lang('UsersConnectedToMySessions').'</a></li>';
echo '<li>| <a href="'.api_get_path(WEB_PATH).'whoisonlinesession.php?id_coach='.$_user['user_id'].'&amp;referer='.urlencode($_SERVER['REQUEST_URI']).'" target="_top">'.Display::return_icon('session.png', get_lang('UsersConnectedToMySessions'), array('width'=>'13px')).' </a></li>';
if (api_get_setting('use_session_mode') == 'true' && isset($user_id) && api_get_session_id() != 0) {
//echo '<li><a href="'.api_get_path(WEB_PATH).'whoisonlinesession.php?id_coach='.$user_id.'&amp;referer='.urlencode($_SERVER['REQUEST_URI']).'" target="_top">'.get_lang('UsersConnectedToMySessions').'</a></li>';
echo '<li>| <a href="'.api_get_path(WEB_PATH).'whoisonlinesession.php?id_coach='.$user_id.'&amp;referer='.urlencode($_SERVER['REQUEST_URI']).'" target="_top">'.Display::return_icon('session.png', get_lang('UsersConnectedToMySessions'), array('width'=>'13px')).' </a></li>';
}
echo '</li>';
}
if ($_user['user_id'] && isset($_cid)) {
if ($user_id && isset($course_id)) {
if ((api_is_course_admin() || api_is_platform_admin()) && api_get_setting('student_view_enabled') == 'true') {
echo '<li>&nbsp;|&nbsp;';
api_display_tool_view_option();
@ -161,7 +160,6 @@ if ($_user['user_id'] && isset($_cid)) {
}
}
if (api_is_allowed_to_edit()) {
if (!empty($help)) {
echo '<li>';
@ -169,12 +167,6 @@ if (api_is_allowed_to_edit()) {
if (api_get_setting('show_link_bug_notification') != 'true') {
echo '|';
}
//echo get_lang('Help');
/*
<a href="#" onclick="javascript: MyWindow=window.open('<?php echo api_get_path(WEB_CODE_PATH).'help/help.php'; ?>?open=<?php echo $help; ?>','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=620,height=600,left=200,top=20'); return false;">
<img src="<?php echo api_get_path(WEB_IMG_PATH); ?>help.png" style="vertical-align: middle;" title="<?php echo get_lang('Help'); ?>" alt="<?php echo get_lang('Help'); ?>"/></a>
*/?>
<?php
echo "</li>";
}
}
@ -183,37 +175,36 @@ if (api_get_setting('accessibility_font_resize') == 'true') {
echo '<span class="decrease_font" title="'.get_lang('DecreaseFontSize').'">A</span> <span class="reset_font" title="'.get_lang('ResetFontSize').'">A</span> <span class="increase_font" title="'.get_lang('IncreaseFontSize').'">A</span>';
echo '</li>';
}
?>
</ul>
</div>
<div class="clear">&nbsp;</div>
</div>
<div id="header3">
<?php
echo '</ul>';
echo '</div>';
echo '</div>';
}
/* User section */
function show_header_3() {
echo '<div id="header3">';
if ($_user['user_id']) {
// Logout
if (api_get_user_id()) {
$login = '';
if (api_is_anonymous()) {
$login = '('.get_lang('Anonymous').')';
$login = get_lang('Anonymous');
} else {
$uinfo = api_get_user_info(api_get_user_id());
$login = '('.$uinfo['username'].')';
$login = $uinfo['username'];
}
?>
<!-- start user section line with name, my course, my profile, scorm info, etc -->
<ul id="logout">
<li><a href="<?php echo api_get_path(WEB_PATH); ?>index.php?logout=logout&uid=<?php echo $_user['user_id']; ?>" target="_top"><span><?php echo get_lang('Logout').' '.$login; ?></span></a></li>
</ul>
<?php
//start user section line with name, my course, my profile, scorm info, etc
echo '<ul id="logout">';
//echo '<li><span>'.get_lang('LoggedInAsX').' '.$login.'</span></li>';
//echo '<li><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php" target="_top"><span>'.get_lang('Profile').'</span></a></li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'index.php?logout=logout&uid='.api_get_user_id().'" target="_top"><span>'.get_lang('Logout').' ('.$login.')</span></a></li>';
echo '</ul>';
}
?>
<ul>
<?php
$navigation = array();
echo '<ul>';
$navigation = $menu_navigation = array();
$possible_tabs = get_tabs();
// Campus Homepage
@ -223,7 +214,7 @@ if (api_get_setting('show_tabs', 'campus_homepage') == 'true') {
$menu_navigation[SECTION_CAMPUS] = $possible_tabs[SECTION_CAMPUS];
}
if ($_user['user_id'] && !api_is_anonymous()) {
if (api_get_user_id() && !api_is_anonymous()) {
// My Courses
if (api_get_setting('show_tabs', 'my_courses') == 'true') {
$navigation['mycourses'] = $possible_tabs['mycourses'];
@ -380,13 +371,20 @@ if (api_get_self() != '/main/admin/configure_homepage.php') {
}
echo '<li id="insert-link"> <a href="'.api_get_self().'?action=insert_tabs" style="padding-right:0px;"><span>'. Display::return_icon('addd.gif', get_lang('InsertLink'), array('style' => 'vertical-align:middle')).' '.get_lang('InsertLink').'</span></a></li>';
}
echo '</ul>';
echo '</div>';
}
//Header 4
function show_header_4($interbreadcrumb, $language_file, $nameTools) {
$session_id = api_get_session_id();
$session_name = api_get_session_name($session_id);
$_course = api_get_course_info();
/* Plugins for banner section */
$web_course_path = api_get_path(WEB_COURSE_PATH);
if ($_self == 'admin_intro_edition_page')
?>
</ul>
<div style="clear: both;" class="clear"> </div>
</div>
<?php
/*
* if the user is a coach he can see the users who are logged in its session
*/
@ -394,7 +392,7 @@ $navigation = array();
// part 1: Course Homepage. If we are in a course then the first breadcrumb is a link to the course homepage
// hide_course_breadcrumb the parameter has been added to hide the name of the course, that appeared in the default $interbreadcrumb
$my_session_name = is_null($session_name) ? '' : '&nbsp;('.$session_name.')';
if (isset($_cid) and $_cid != -1 and isset($_course) and !isset($_GET['hide_course_breadcrumb'])) {
if (!empty($_course) && !isset($_GET['hide_course_breadcrumb'])) {
$navigation_item['url'] = $web_course_path . $_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : '');
switch (api_get_setting('breadcrumbs_course_homepage')) {
case 'get_lang':
@ -425,42 +423,28 @@ if (isset($interbreadcrumb) && is_array($interbreadcrumb)) {
// titles for shared folders
if ($breadcrumb_step['name'] == 'shared_folder') {
$navigation_item['title'] = get_lang('UserFolders');
}
elseif(strstr($breadcrumb_step['name'], 'shared_folder_session_')) {
} elseif(strstr($breadcrumb_step['name'], 'shared_folder_session_')) {
$navigation_item['title'] = get_lang('UserFolders');
}
elseif(strstr($breadcrumb_step['name'], 'sf_user_')) {
} elseif(strstr($breadcrumb_step['name'], 'sf_user_')) {
$userinfo = Database::get_user_info_from_id(substr($breadcrumb_step['name'], 8));
$navigation_item['title'] = api_get_person_name($userinfo['firstname'], $userinfo['lastname']);
}
elseif($breadcrumb_step['name'] == 'chat_files') {
} elseif($breadcrumb_step['name'] == 'chat_files') {
$navigation_item['title'] = get_lang('ChatFiles');
}
elseif($breadcrumb_step['name'] == 'images') {
} elseif($breadcrumb_step['name'] == 'images') {
$navigation_item['title'] = get_lang('Images');
}
elseif($breadcrumb_step['name'] == 'video') {
} elseif($breadcrumb_step['name'] == 'video') {
$navigation_item['title'] = get_lang('Video');
}
elseif($breadcrumb_step['name'] == 'audio') {
} elseif($breadcrumb_step['name'] == 'audio') {
$navigation_item['title'] = get_lang('Audio');
}
elseif($breadcrumb_step['name'] == 'flash') {
} elseif($breadcrumb_step['name'] == 'flash') {
$navigation_item['title'] = get_lang('Flash');
}
elseif($breadcrumb_step['name'] == 'gallery') {
} elseif($breadcrumb_step['name'] == 'gallery') {
$navigation_item['title'] = get_lang('Gallery');
}
$navigation[] = $navigation_item;
}
}
// part 3: The tool itself. If we are on the course homepage we do not want to display the title of the course because this
// is the same as the first part of the breadcrumbs (see part 1)
if (isset($nameTools) && $language_file != 'course_home') { // TODO: This condition $language_file != 'course_home' might bring surprises.
@ -470,26 +454,109 @@ if (isset($nameTools) && $language_file != 'course_home') { // TODO: This condit
}
$final_navigation = array();
$counter = 0;
foreach ($navigation as $index => $navigation_info) {
if (!empty($navigation_info['title'])) {
$final_navigation[$index] = '<a href="'.$navigation_info['url'].'" class="breadcrumb breadcrumb'.$index.'" target="_top">'.$navigation_info['title'].'</a>';
$final_navigation[$index] = '<a href="'.$navigation_info['url'].'" class="breadcrumb breadcrumb'.$index.'" target="_top"><span>'.$navigation_info['title'].'</span></a>';
$counter++;
}
}
if (in_array(api_get_visual_theme(), array('chamilo','chamilo_red','chamilo_blue','chamilo_orange','chamilo_green','chamilo_electric_blue'))) {
//@todo move this in CSS
$style = '<style>
#header3 {
background:none;
//padding:2px;
border-bottom:1px solid #ccc;
width: 92%;
margin-bottom:0px;
padding:0px;
}
#header2 {
min-height: 28px;
}
#current {
margin-right: 2px;
}
#current #tab_active {
//background:none;
}
#header3 a {
//background:none;
}
#header3 li {
//background:none;
//background-color: #CCCCCC;
//border-radius:5px;
//margin:0px 1px 0px 1px;
}
#header3 li a span {
//background:none;
}
#header4 {
height:2.3em;
padding:0px;
background:none;
width: 92%;
}
#main {
border : 1px solid #ddd;
}
}</style>';
echo $style;
if (!empty($final_navigation)) {
echo '<div id="header4">';
echo implode(' &gt; ', $final_navigation);
$lis = '';
$i = 0;
foreach($final_navigation as $bread) {
$lis.= Display::tag('li', $bread);
$i++;
}
echo Display::tag('ul',$lis, array('class'=>'bread'));
echo '</div>';
} else {
echo '<div id="header4">';
echo '</div>';
}
} else {
if (!empty($final_navigation)) {
echo '<div id="header4">';
$i = 0;
$count = count($final_navigation);
foreach($final_navigation as $bread) {
if ($i < $count -1 && $count != 1) {
$bread .=' > ';
}
echo $bread;
$i++;
}
echo '</div>';
} else {
echo '<div id="header4">';
echo '</div>';
}
}
echo '<div class="clear"></div>';
if (api_get_setting('show_toolshortcuts') == 'true') {
echo '<div id="toolshortcuts">';
require_once 'tool_navigation_menu.inc.php';
show_navigation_tool_shortcuts();
echo '</div>';
}
}
show_header_1($language_file, $nameTools);
show_header_2($help);
show_header_3();
show_header_4($interbreadcrumb, $language_file, $nameTools);
if (isset($database_connection)) {
// connect to the main database.
@ -500,20 +567,16 @@ if (isset($database_connection)) {
// (ex. SELECT * FROM table_from_main_db - SELECT * FROM courseDB.table_from_course_db)
Database::select_db($_configuration['main_database'], $database_connection);
}
?>
</div> <!-- end of the whole #header section -->
<div class="clear">&nbsp;</div>
<?php
echo '</div>'; // <!-- end of the whole #header section -->
//to mask the main div, set $header_hide_main_div to true in any script just before calling Display::display_header();
global $header_hide_main_div;
if (!empty($header_hide_main_div) && $header_hide_main_div === true) {
//do nothing
} else {
?>
<div id="main"> <!-- start of #main wrapper for #content and #menu divs -->
<?php
echo '<div id="main">'; //<!-- start of #main wrapper for #content and #menu divs -->
}
/* "call for chat" module section */
@ -540,18 +603,16 @@ if (api_get_setting('show_navigation_menu') != 'false' && api_get_setting('show_
if (isset($_SESSION['hideMenu'])) {
if ($_SESSION['hideMenu'] == 'shown') {
if (isset($_cid)) {
echo '<div id="centerwrap"> <!-- start of #centerwrap -->';
echo '<div id="center"> <!-- start of #center -->';
echo '<div id="centerwrap">'; // <!-- start of #centerwrap -->
echo '<div id="center">'; // <!-- start of #center -->
}
}
} else {
if (isset($_cid)) {
echo '<div id="centerwrap"> <!-- start of #centerwrap -->';
echo '<div id="center"> <!-- start of #center -->';
echo '<div id="centerwrap">'; // <!-- start of #centerwrap -->
echo '<div id="center">'; //<!-- start of #center -->
}
}
}
}
?>
<!-- Begin Of script Output -->
//<!-- Begin Of script Output -->
Loading…
Cancel
Save