Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.253.2.3 and 1.253.2.4

version 1.253.2.3, 2010/10/04 19:19:15 version 1.253.2.4, 2010/10/04 19:43:30
Line 1382  returns: nothing Line 1382  returns: nothing
                 return unless($last);                  return unless($last);
             } else {              } else {
                 my $description = 'Menu';                  my $description = 'Menu';
                   my $href = '/adm/menu';
                   my $tooltip = 'Go to main menu';
                 my $no_mt_descr = 0;                  my $no_mt_descr = 0;
                 if ((exists($env{'request.course.id'})) &&                  if ((exists($env{'request.course.id'})) &&
                     ($env{'request.course.id'} ne '') &&                      ($env{'request.course.id'} ne '')) {
                     ($env{'course.'.$env{'request.course.id'}.'.description'} ne '')) {  
                     $description =                      if ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) {
                         $env{'course.'.$env{'request.course.id'}.'.description'};                          $href = '/adm/navmaps';
                     $no_mt_descr = 1;                          $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',                  $menulink =  {  href   => $href,
                                 title  =>'Go to main menu',                                  title  => $tooltip,
                                 target =>'_top',                                  target => '_top',
                                 text   =>$description,                                  text   => $description,
                                 no_mt  =>$no_mt_descr, };                                  no_mt  => $no_mt_descr, };
                 if($last) {                  if ($last) {
                     #$last set, so we have some crumbs                      #$last set, so we have some crumbs
                     unshift(@Crumbs,$menulink);                      unshift(@Crumbs,$menulink);
                 } else {                  } else {
Line 1433  returns: nothing Line 1441  returns: nothing
         # last breadcrumb is the first order heading of a page          # last breadcrumb is the first order heading of a page
         # for course breadcrumbs it's just bold          # for course breadcrumbs it's just bold
         $links .= htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1',          $links .= htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1',
                 $lasttext), {title => $lasttext});                             $lasttext), {title => $lasttext});
   
         my $icons = '';          my $icons = '';
         $faq  = $last->{'faq'}  if (exists($last->{'faq'}));          $faq  = $last->{'faq'}  if (exists($last->{'faq'}));
Line 1568  returns: nothing Line 1576  returns: nothing
                    { listattr => { class=>'LC_breadcrumb_tools_outerlist' } });                     { 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  Creates html for advanced tools (category advtools) and inserts \$breadcrumbs
 at the correct position.  at the correct position.
Line 1580  returns: nothing Line 1588  returns: nothing
 =cut  =cut
   
     sub render_advtools {      sub render_advtools {
         my ($breadcrumbs) = @_;          my ($breadcrumbs,$legend) = @_;
         return unless     (defined $tools{'advtools'})          return unless     (defined $tools{'advtools'})
                       and (scalar(@{$tools{'advtools'}}) > 0);                        and (scalar(@{$tools{'advtools'}}) > 0);
           my $args;
           if ($legend) {
               $args = {legend => $legend};
           }
         $$breadcrumbs .= Apache::loncommon::head_subbox(          $$breadcrumbs .= Apache::loncommon::head_subbox(
                             funclist_from_array($tools{'advtools'}) );                              funclist_from_array($tools{'advtools'},$args));
     }      }
   
 } # End of scope for @Crumbs  } # End of scope for @Crumbs

Removed from v.1.253.2.3  
changed lines
  Added in v.1.253.2.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>