Fixing course tool bar

skala
Julio Montoya 14 years ago
parent 059bd61fcb
commit 8a696530cd
  1. 20
      main/css/base.css
  2. 5
      main/css/base_chamilo.css
  3. 2
      main/css/base_classic.css
  4. 11
      main/inc/banner.inc.php
  5. 6
      main/inc/lib/banner.lib.php
  6. 45
      main/inc/tool_navigation_menu.inc.php

@ -708,3 +708,23 @@ div.system_announcement {
#social_widget {
float:none;
}
#toolshortcuts_horizontal {
padding: 8px 20px 2px 0px;
clear: right;
margin-left: auto;
margin-right: auto;
text-align: right;
width: 98%;
}
#toolshortcuts_vertical {
padding: 8px 0px 2px 0px;
clear: right;
margin-left: auto;
margin-right: auto;
text-align: right;
width: 98%;
}

@ -62,4 +62,9 @@ div.admin_section {
width:50%;
}
#toolshortcuts_horizontal {
border-top:1px solid #ccc;
width:92%;
padding: 8px 0px 2px 0;
}

@ -7,7 +7,7 @@
}
#header2 {
min-height: 15px;
min-height: 25px;
}
#header3 {

@ -40,8 +40,10 @@ echo '<div id="header">';
show_header_1($language_file, $nameTools);
show_header_2();
show_header_3();
show_header_4($interbreadcrumb, $language_file, $nameTools);
if (isset($database_connection)) {
// connect to the main database.
// if single database, don't pefix table names with the main database name in SQL queries
@ -52,8 +54,15 @@ if (isset($database_connection)) {
Database::select_db($_configuration['main_database'], $database_connection);
}
echo '</div>'; // <!-- end of the whole #header section -->
if (api_get_setting('show_toolshortcuts') == 'true') {
require_once api_get_path(INCLUDE_PATH).'tool_navigation_menu.inc.php';
show_navigation_tool_shortcuts();
}
echo '<div id="main">';
echo '<div id="submain">';
echo '<div id="submain">';
/* "call for chat" module section */

@ -589,10 +589,4 @@ function show_header_4($interbreadcrumb, $language_file, $nameTools) {
}
}
echo '<div class="clear"></div>';
if (api_get_setting('show_toolshortcuts') == 'true') {
echo '<div id="toolshortcuts">';
require_once api_get_path(INCLUDE_PATH).'tool_navigation_menu.inc.php';
show_navigation_tool_shortcuts();
echo '</div>';
}
}

@ -205,22 +205,31 @@ function show_navigation_menu() {
* Show a toolbar with shortcuts to the course tool
*/
function show_navigation_tool_shortcuts($orientation = SHORTCUTS_HORIZONTAL) {
$navigation_items = get_navigation_items(false);
foreach ($navigation_items as $key => $navigation_item) {
if (strpos($navigation_item['link'],'chat') !== false && api_get_course_setting('allow_open_chat_window')) {
echo '<a href="javascript: void(0);" onclick="javascript: window.open(\''.$navigation_item['link'].'\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $navigation_item['target'] . '"';
} else {
echo '<a href="'.$navigation_item['link'].'"';
}
if (strpos(api_get_self(), $navigation_item['link']) !== false) {
echo ' id="here"';
}
echo ' target="_top" title="'.$navigation_item['name'].'">';
echo '<img src="'.api_get_path(WEB_IMG_PATH).$navigation_item['image'].'" alt="'.$navigation_item['name'].'"/>';
echo '</a>';
if ($orientation == SHORTCUTS_VERTICAL) {
echo '<br />';
}
}
$navigation_items = get_navigation_items(false);
if (!empty($navigation_items)) {
if ($orientation == SHORTCUTS_HORIZONTAL)
$style_id = "toolshortcuts_horizontal";
else {
$style_id = "toolshortcuts_vertical";
}
echo '<div id="'.$style_id.'">';
foreach ($navigation_items as $key => $navigation_item) {
if (strpos($navigation_item['link'],'chat') !== false && api_get_course_setting('allow_open_chat_window')) {
echo '<a href="javascript: void(0);" onclick="javascript: window.open(\''.$navigation_item['link'].'\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $navigation_item['target'] . '"';
} else {
echo '<a href="'.$navigation_item['link'].'"';
}
if (strpos(api_get_self(), $navigation_item['link']) !== false) {
echo ' id="here"';
}
echo ' target="_top" title="'.$navigation_item['name'].'">';
echo '<img src="'.api_get_path(WEB_IMG_PATH).$navigation_item['image'].'" alt="'.$navigation_item['name'].'"/>';
echo '</a> ';
if ($orientation == SHORTCUTS_VERTICAL) {
echo '<br />';
}
}
echo '</div>';
}
}

Loading…
Cancel
Save