diff --git a/phpgwapi/templates/idots/navbar.inc.php b/phpgwapi/templates/idots/navbar.inc.php index 779150491e..1c93da728f 100644 --- a/phpgwapi/templates/idots/navbar.inc.php +++ b/phpgwapi/templates/idots/navbar.inc.php @@ -30,28 +30,30 @@ $GLOBALS['idots_tpl']->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer'); $GLOBALS['idots_tpl']->set_block('navbar','appbox','appbox'); $GLOBALS['idots_tpl']->set_block('navbar','navbar_footer','navbar_footer'); - + $var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images'; $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover') { - $show_menu_event='onMouseOver'; + $show_menu_event = 'onMouseOver'; } else { - $show_menu_event='onClick'; + $show_menu_event = 'onClick'; } - $applications = ''; - + // == 'icons_and_text') - + $max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons']; - if(!$max_icons) $max_icons=200; - + if(!$max_icons) + { + $max_icons=200; + } + foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) { if($app != 'home' && $app != 'preferences' && $app != 'about' && $app != 'logout') @@ -78,8 +80,6 @@ } $app_titles .= '>' . $title . ''; - - } else // generate extra icon layer | always shows icons and text { @@ -92,7 +92,7 @@ $app_extra_icons .= '>' . $icon . ''; - $app_extra_icons .= '$max_icons) + if($i > $max_icons) { - $app_extra_icons_div=' + $app_extra_icons_div = ' + '; - + $var['app_extra_icons_div']= $app_extra_icons_div; // $var['app_extra_icons_icon']= ''; $var['app_extra_icons_icon']= ''; - } - if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='icons') { $var['app_titles'] = $app_titles; @@ -152,8 +150,8 @@ if(isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) { $var['current_users'] = '' - . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . ''; + . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">' + . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . ''; } $now = time(); $var['user_info'] = ''.$GLOBALS['phpgw']->common->display_fullname() .''. ' - ' @@ -184,7 +182,6 @@ $GLOBALS['idots_tpl']->set_var($var); $GLOBALS['idots_tpl']->pfp('out','navbar_header'); - /******************************************************\ * The sidebox menu's * \******************************************************/ @@ -203,49 +200,46 @@ 'link' => $GLOBALS['phpgw_info']['navbar']['about']['url'] ), 'Logout'=>$GLOBALS['phpgw_info']['navbar']['logout']['url'] - ); - + ); + if($GLOBALS['phpgw_info']['user']['preferences']['common']['auto_hide_sidebox']==1) { $GLOBALS['idots_tpl']->set_var('show_menu_event',$show_menu_event); $GLOBALS['idots_tpl']->pparse('out','sidebox_hide_header'); - + display_sidebox('',$menu_title,$file); $GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']); - + $GLOBALS['idots_tpl']->pparse('out','sidebox_hide_footer'); - $var[sideboxcolstart]=''; - + $var['sideboxcolstart']=''; + $GLOBALS['idots_tpl']->set_var($var); $GLOBALS['idots_tpl']->pparse('out','appbox'); - $var[remove_padding]='style="padding-left:0px;"'; - $var[sideboxcolend]=''; - + $var['remove_padding'] = 'style="padding-left:0px;"'; + $var['sideboxcolend'] = ''; } else { - $var[menu_link]=''; - $var[sideboxcolstart]=''; - $var[remove_padding]=''; + $var['menu_link'] = ''; + $var['sideboxcolstart'] = ''; + $var['remove_padding'] = ''; $GLOBALS['idots_tpl']->set_var($var); $GLOBALS['idots_tpl']->pparse('out','appbox'); - + display_sidebox('',$menu_title,$file); $GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']); - - $var[sideboxcolend]=''; + + $var['sideboxcolend'] = ''; } $GLOBALS['idots_tpl']->set_var($var); $GLOBALS['idots_tpl']->pparse('out','navbar_footer'); - - // If the application has a header include, we now include it - if(!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) + if(!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($_GET['menuaction'])) { - list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); + list($app,$class,$method) = explode('.',$_GET['menuaction']); if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) { $GLOBALS[$class]->header(); @@ -293,13 +287,13 @@ $var['item_link'] = $item_link['link']; if ($item_link['target']) { - $var['target'] = " target=\"$item_link[target]\""; + $var['target'] = ' target="' . $item_link['target'] . '"'; } } else { - $var['lang_item']=lang($item_text); - $var['item_link']=$item_link; + $var['lang_item'] = lang($item_text); + $var['item_link'] = $item_link; } $GLOBALS['idots_tpl']->set_var($var); $GLOBALS['idots_tpl']->pparse('out','extra_block_row'); @@ -322,11 +316,10 @@ ); $GLOBALS['phpgw']->hooks->process('navbar_end'); - if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) { $mtime = microtime(); - $mtime = explode(" ",$mtime); + $mtime = explode(' ',$mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $GLOBALS['page_start_time']);