--- loncom/interface/lonhtmlcommon.pm 2010/10/04 19:19:15 1.253.2.3 +++ loncom/interface/lonhtmlcommon.pm 2010/10/04 19:43:30 1.253.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.253.2.3 2010/10/04 19:19:15 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.253.2.4 2010/10/04 19:43:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1382,20 +1382,28 @@ returns: nothing return unless($last); } else { my $description = 'Menu'; + my $href = '/adm/menu'; + my $tooltip = 'Go to main menu'; my $no_mt_descr = 0; if ((exists($env{'request.course.id'})) && - ($env{'request.course.id'} ne '') && - ($env{'course.'.$env{'request.course.id'}.'.description'} ne '')) { - $description = - $env{'course.'.$env{'request.course.id'}.'.description'}; - $no_mt_descr = 1; + ($env{'request.course.id'} ne '')) { + + if ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) { + $href = '/adm/navmaps'; + $tooltip = 'Contents'; + } + if ($env{'course.'.$env{'request.course.id'}.'.description'} ne '') { + $description = + $env{'course.'.$env{'request.course.id'}.'.description'}; + $no_mt_descr = 1; + } } - $menulink = { href =>'/adm/menu', - title =>'Go to main menu', - target =>'_top', - text =>$description, - no_mt =>$no_mt_descr, }; - if($last) { + $menulink = { href => $href, + title => $tooltip, + target => '_top', + text => $description, + no_mt => $no_mt_descr, }; + if ($last) { #$last set, so we have some crumbs unshift(@Crumbs,$menulink); } else { @@ -1433,7 +1441,7 @@ returns: nothing # last breadcrumb is the first order heading of a page # for course breadcrumbs it's just bold $links .= htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', - $lasttext), {title => $lasttext}); + $lasttext), {title => $lasttext}); my $icons = ''; $faq = $last->{'faq'} if (exists($last->{'faq'})); @@ -1568,7 +1576,7 @@ returns: nothing { listattr => { class=>'LC_breadcrumb_tools_outerlist' } }); } -=item render_advtools(\$breadcrumbs) +=item render_advtools(\$breadcrumbs,$legend) Creates html for advanced tools (category advtools) and inserts \$breadcrumbs at the correct position. @@ -1580,12 +1588,15 @@ returns: nothing =cut sub render_advtools { - my ($breadcrumbs) = @_; + my ($breadcrumbs,$legend) = @_; return unless (defined $tools{'advtools'}) and (scalar(@{$tools{'advtools'}}) > 0); - + my $args; + if ($legend) { + $args = {legend => $legend}; + } $$breadcrumbs .= Apache::loncommon::head_subbox( - funclist_from_array($tools{'advtools'}) ); + funclist_from_array($tools{'advtools'},$args)); } } # End of scope for @Crumbs