Fixing template variables

skala
Julio Montoya 14 years ago
parent dabbe45c7b
commit e615ad5cf6
  1. 4
      main/admin/settings.lib.php
  2. 17
      main/inc/lib/banner.lib.php
  3. 10
      main/inc/lib/template.lib.php
  4. 6
      main/template/default/layout/main_header.tpl

@ -112,9 +112,9 @@ function handle_plugins() {
echo '<table class="data_table">';
echo '<tr>';
echo '<th width="20px">';
echo get_lang('Plugin');
echo get_lang('Action');
echo '</th><th>';
echo get_lang('InstallPlugin');
echo get_lang('Description');
echo '</th>';
echo '</tr>';

@ -164,7 +164,7 @@ function show_header_1($language_file, $nameTools, $theme) {
return $html;
}
function show_header_2() {
function return_notification_menu() {
$_course = api_get_course_info();
$course_id = api_get_course_id();
@ -324,12 +324,11 @@ function return_navigation_array() {
}
return array('menu_navigation' => $menu_navigation, 'navigation' => $navigation, 'possible_tabs' => $possible_tabs);
}
function show_header_3() {
function return_menu() {
$navigation = return_navigation_array();
//$menu_navigation = $navigation['menu_navigation'];
$navigation = $navigation['navigation'];
//$possible_tabs = $navigation['possible_tabs'];
// Displaying the tabs
$lang = ''; //el for "Edit Language"
@ -412,8 +411,6 @@ function show_header_3() {
// Logout
if ($show_bar) {
if (api_get_user_id()) {
$login = '';
if (api_is_anonymous()) {
@ -430,18 +427,16 @@ function show_header_3() {
$header3 .= '</ul>';
}
if (!empty($lis)) {
if (!empty($lis)) {
$header3 .= '<ul class="nav nav-pills">';
$header3 .= $lis;
$header3 .= '</ul>';
}
}
return $header3;
}
function show_breadcrumb($interbreadcrumb, $language_file, $nameTools) {
function return_breadcrumb($interbreadcrumb, $language_file, $nameTools) {
$session_id = api_get_session_id();
$session_name = api_get_session_name($session_id);

@ -466,12 +466,12 @@ class Template extends Smarty {
$this->assign('bug_notification_link', $bug_notification_link);
$header2 = show_header_2();
$header3 = show_header_3();
$breadcrumb = show_breadcrumb($interbreadcrumb, $language_file, $nameTools);
$notification = return_notification_menu();
$menu = return_menu();
$breadcrumb = return_breadcrumb($interbreadcrumb, $language_file, $nameTools);
$this->assign('header2', $header2);
$this->assign('header3', $header3);
$this->assign('notification_menu', $notification);
$this->assign('menu', $menu);
$this->assign('breadcrumb', $breadcrumb);
if (!api_is_platform_admin()) {

@ -53,7 +53,7 @@
<div id="header_right" class="span4">
{* header right (notifications) *}
<ul id="notifications" class="nav nav-pills pull-right">
{$header2}
{$notification_menu}
</ul>
{* plugin_header *}
@ -77,9 +77,9 @@
{/if}
</header>
{* header 3 - menu *}
{if $header3}
{if $menu}
<div id="header3" class="subnav">
{$header3}
{$menu}
</div>
{/if}

Loading…
Cancel
Save