Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.286 and 1.287

version 1.286, 2011/01/13 17:44:30 version 1.287, 2011/01/16 22:45:05
Line 1424  sub htmlareabrowser { Line 1424  sub htmlareabrowser {
     return 1;      return 1;
 }  }
   
   #
   # Should the "return to content" link be shown?
   #
   
   sub show_return_link {
       if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)})
           || ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) {
   
           return if ($env{'form.register'});
       }
       return (($env{'request.noversionuri'}=~m{^/(res|public)/} &&
                $env{'request.symb'} eq '')
               ||
               ($env{'request.noversionuri'}=~ m{^/cgi-bin/printout.pl})
               ||
               (($env{'request.noversionuri'}=~/^\/adm\//) &&
                ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
                ($env{'request.noversionuri'}!~
                 m{^/adm/.*/(smppg|bulletinboard)($|\?)})
              ));
   }
   
   
 ############################################################  ############################################################
 ############################################################  ############################################################
   
Line 1509  returns: nothing Line 1532  returns: nothing
                 $last = $menulink;                  $last = $menulink;
             }              }
         }          }
         my $links = join "",           my $links;
           if ((&show_return_link) && (!$CourseBreadcrumbs)) {
              $links=&htmltag( 'a',"<img src='/res/adm/pages/reload.png' border='0' style='vertical-align:middle;' />",
                               { href => '/adm/flip?postdata=return:',
                                 title => &mt("Back to most recent content resource") });
           }
           $links.= join "", 
              map {               map {
                  $faq  = $_->{'faq'}  if (exists($_->{'faq'}));                   $faq  = $_->{'faq'}  if (exists($_->{'faq'}));
                  $bug  = $_->{'bug'}  if (exists($_->{'bug'}));                   $bug  = $_->{'bug'}  if (exists($_->{'bug'}));
                  $help = $_->{'help'} if (exists($_->{'help'}));                   $help = $_->{'help'} if (exists($_->{'help'}));
   
                  my $result = $_->{no_mt} ? $_->{text} : mt($_->{text});                   my $result = $_->{no_mt} ? $_->{text} : &mt($_->{text});
   
                  if ($_->{href}){                   if ($_->{href}){
                      $result = htmltag( 'a', $result,                        $result = &htmltag( 'a', $result, 
                        { href   => $_->{href},                         { href   => $_->{href},
                          title  => $_->{no_mt} ? $_->{title} : mt($_->{title}),                           title  => $_->{no_mt} ? $_->{title} : &mt($_->{title}),
                          target => $_->{target}, });                           target => $_->{target}, });
                  }                   }
   
                  $result = htmltag( 'li', "$result $crumbsymbol");                   $result = &htmltag( 'li', "$result $crumbsymbol");
              } @Crumbs;               } @Crumbs;
   
         #should the last Element be translated?          #should the last Element be translated?
Line 1534  returns: nothing Line 1563  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 = '';
Line 1557  returns: nothing Line 1586  returns: nothing
   
   
         unless ($CourseBreadcrumbs) {          unless ($CourseBreadcrumbs) {
             $links = htmltag('ol',  $links, { id => "LC_MenuBreadcrumbs"   });              $links = &htmltag('ol',  $links, { id => "LC_MenuBreadcrumbs"   });
         } else {          } else {
             $links = htmltag('ul',  $links, { class => "LC_CourseBreadcrumbs" });              $links = &htmltag('ul',  $links, { class => "LC_CourseBreadcrumbs" });
         }          }
   
         if ($component) {          if ($component) {
             $links = htmltag('span',               $links = &htmltag('span', 
                              ( $no_mt ? $component : mt($component) ).                               ( $no_mt ? $component : mt($component) ).
                              ( $icons ? $icons : '' ),                               ( $icons ? $icons : '' ),
                              { class => 'LC_breadcrumbs_component' } )                               { class => 'LC_breadcrumbs_component' } )
                              .$links;                               .$links;
         }          }
                   
         render_tools(\$links);          &render_tools(\$links);
         $links = htmltag('div', $links,           $links = &htmltag('div', $links, 
                         { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;                          { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;
         render_advtools(\$links);          &render_advtools(\$links);
   
         # Return the @Crumbs stack to what we started with          # Return the @Crumbs stack to what we started with
         push(@Crumbs,$last);          push(@Crumbs,$last);

Removed from v.1.286  
changed lines
  Added in v.1.287


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