[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonmainmenu.pm
droeschl
droeschl@source.lon-capa.org
Sat, 16 May 2009 21:50:52 -0000
droeschl Sat May 16 21:50:52 2009 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm lonmainmenu.pm
Log:
Changes related to modification of LON-CAPA screen header.
Added breadcrumb to main menu. This will replace title bar.
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.214 loncom/interface/lonhtmlcommon.pm:1.215
--- loncom/interface/lonhtmlcommon.pm:1.214 Sat May 16 18:06:41 2009
+++ loncom/interface/lonhtmlcommon.pm Sat May 16 21:50:52 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.214 2009/05/16 18:06:41 tempelho Exp $
+# $Id: lonhtmlcommon.pm,v 1.215 2009/05/16 21:50:52 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1332,7 +1332,7 @@
sub breadcrumbs {
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, $no_realBreadcrumb) = @_;
#
- $css_class ||= 'LC_breadcrumbs';
+ $css_class ||= 'LC_breadcrumbs';
my $Str1 = '<div id="LC_head_subbox"><ol id="LC_MenuBreadcrumbs">';
if($no_realBreadcrumb){
@@ -1344,14 +1344,14 @@
# Make the faq and bug data cascade
my $faq = '';
my $bug = '';
- my $help='';
- # Crumb Symbol
- my $crumbsymbol = '» ';
+ my $help='';
+ # Crumb Symbol
+ my $crumbsymbol = '» ';
# The last breadcrumb does not have a link, so handle it separately.
my $last = pop(@Crumbs);
#
# The first one should be the course or a menu link
- if (!defined($menulink)) { $menulink=1; }
+ if (!defined($menulink)) { $menulink=1; }
if ($menulink) {
my $description = 'Menu';
my $no_mt_descr = 0;
@@ -1361,13 +1361,18 @@
$env{'course.'.$env{'request.course.id'}.'.description'};
$no_mt_descr = 1;
}
- unshift(@Crumbs,{
- href =>'/adm/menu',
- title =>'Go to main menu',
- target =>'_top',
- text =>$description,
- no_mt =>$no_mt_descr,
- });
+ $menulink = { href =>'/adm/menu',
+ title =>'Go to main menu',
+ target =>'_top',
+ text =>$description,
+ no_mt =>$no_mt_descr, };
+ if($last) {
+ #$last set, so we have some crumbs
+ unshift(@Crumbs,$menulink);
+ } else {
+ #only menulink crumb present
+ $last = $menulink;
+ }
}
my $links .= '<li>'.
join('</li><li>'.$crumbsymbol,
Index: loncom/interface/lonmainmenu.pm
diff -u loncom/interface/lonmainmenu.pm:1.5 loncom/interface/lonmainmenu.pm:1.6
--- loncom/interface/lonmainmenu.pm:1.5 Wed Apr 11 02:42:00 2007
+++ loncom/interface/lonmainmenu.pm Sat May 16 21:50:52 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# displays the main menu
#
-# $Id: lonmainmenu.pm,v 1.5 2007/04/11 02:42:00 www Exp $
+# $Id: lonmainmenu.pm,v 1.6 2009/05/16 21:50:52 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -71,7 +71,9 @@
$env{'browser.interface'}='faketextual';
$env{'environment.remote'}='off';
}
- $r->print(&Apache::loncommon::start_page('Main Menu',$script_tag));
+ $r->print(&Apache::loncommon::start_page( 'Main Menu',
+ $script_tag,
+ {'bread_crumbs' => 1}));
$r->print(&Apache::lonmenu::inlinemenu().$form);
$r->print(&Apache::loncommon::end_page());
return OK;