Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.239 and 1.240

version 1.239, 2009/11/06 10:14:12 version 1.240, 2009/11/06 18:32:42
Line 1815  sub course_custom_roles { Line 1815  sub course_custom_roles {
   
 # topic_bar  # topic_bar
 #  #
 # Generates a div containing a numbered (static image) followed by a title  # Generates a div containing an (optional) numbered (static) image followed by a 
 # with a background color defined in the corresponding CSS: LC_topic_bar  # title with a background color defined in the corresponding CSS: LC_topic_bar
 #  # Inputs:
   # 1. number to display (corresponding static image should exist).
   #    img tag will be included if arg is an integer in the range 1 to 9. 
   # 2. title text to display.
   # Outputs - a scalar containing html mark-up for the div.
   
 sub topic_bar {  sub topic_bar {
     my ($imgnum,$title, $show_number) = @_;      my ($imgnum,$title) = @_;
     my $output = undef;      my $imgtag;
     if (!$show_number) {      if ($imgnum =~ /^[1-9]$/) {
         $output = '<div class="LC_topic_bar">'          $imgtag = '<img src="/res/adm/pages/bl_step'.$imgnum.'.gif"'. 
           .'<img src="/res/adm/pages/bl_step'.$imgnum.'.gif"'                    ' alt="'.&mt('Step [_1]',$imgnum).'" /> ';
           .' alt="'.&mt('Step [_1]',$imgnum).'" />'  
           .' '.$title  
           .'</div>';  
     } else {  
         $output = '<div class="LC_topic_bar">'  
             .$title  
             .'</div>';  
     }      }
       return '<div class="LC_topic_bar">'.$imgtag.$title.'</div>';
     return $output;  
 }  }
   
 ##############################################  ##############################################

Removed from v.1.239  
changed lines
  Added in v.1.240


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