Diff for /rat/lonratedt.pm between versions 1.89 and 1.90

version 1.89, 2008/09/11 14:47:24 version 1.90, 2008/10/13 11:54:54
Line 775  sub viewmap { Line 775  sub viewmap {
       &Apache::loncommon::help_open_menu('','',6,'RAT').        &Apache::loncommon::help_open_menu('','',6,'RAT').
       &buttons($adv));        &buttons($adv));
     if ($errtext) {      if ($errtext) {
  $r->print($errtext.'<hr />');   $r->print('<div class="LC_error">'
                    .$errtext
                    .'</div>'
                    .'<hr />'
           );
     }      }
     my $idx=0;      my $idx=0;
     $r->print('<h1>'.$url.'</h1>');      $r->print('<h1>'.$url.'</h1>');
     if ($adv) {      if ($adv) {
  $r->print('<p><b><font color="red">'.&mt('Map contents are not shown in order.').'</font></b></p><br />');   $r->print('<p class="LC_warning">'
                    .&mt('Map contents are not shown in order.')
                    .'</p><br />'
           );
     }      }
     $r->print( '<table border="0" cellspacing="2" cellpadding="4">'.      $r->print(&Apache::loncommon::start_data_table()
                '<tr bgcolor="#DDDDDD"><th>'.&mt('Type').'</th>'.               .&Apache::loncommon::start_data_table_header_row()
                '<th>'.&mt('Title in map').'</th>'.               .'<th>'.&mt('Type').'</th>'
                '<th>'.&mt('Filename of resource').'</th>'.               .'<th>'.&mt('Title in map').'</th>'
                '<th>'.&mt('Link to published resource').'</th>'.               .'<th>'.&mt('Filename of resource').'</th>'
                '<th>'.&mt('Link to resource in Construction Space').'</th>'.               .'<th>'.&mt('Link to published resource').'</th>'
                '</tr>');               .'<th>'.&mt('Link to resource in Construction Space').'</th>'
     my @backgroundColors = ("#FFFFFF", "#F6F6F6");               .&Apache::loncommon::end_data_table_header_row()
       );
     foreach (&LONCAPA::map::attemptread(&Apache::lonnet::filelocation('',$url))) {      foreach (&LONCAPA::map::attemptread(&Apache::lonnet::filelocation('',$url))) {
  if (defined($_)) {   if (defined($_)) {
             $idx++;              $idx++;
Line 807  sub viewmap { Line 815  sub viewmap {
             }              }
             my $cstrurl = $resurl;              my $cstrurl = $resurl;
             $cstrurl =~ s#^/res/[^/]+/([^/]+)/#/priv/$1/#;              $cstrurl =~ s#^/res/[^/]+/([^/]+)/#/priv/$1/#;
             my $bgcol = $idx%2;               $r->print(&Apache::loncommon::start_data_table_row()
             $r->print('<tr bgcolor='.$backgroundColors[$bgcol].'><td>'.                       .'<td>'
                       '<img src="'.&Apache::loncommon::icon($resfilepath).                       .'<img src="'.&Apache::loncommon::icon($resfilepath).'" />'
                       '" /></td><td>'.&HTML::Entities::encode(&LONCAPA::map::qtescape($title)).                       .'</td>'
                       '</td><td>'.$filename.'</td><td>');                       .'<td>'
                        .&HTML::Entities::encode(&LONCAPA::map::qtescape($title))
                        .'</td>'
                        .'<td>'.$filename.'</td>'
                        .'<td>'
               );
             if ($url) {              if ($url) {
  $r->print('<a href="'.$resurl.'">'.&mt('Resource space').'</a>');   $r->print('<a href="'.$resurl.'">'.&mt('Resource space').'</a>');
               } else {
                   $r->print('&nbsp;');
             }              }
             $r->print('</td><td>');              $r->print('</td><td>');
             if ($url) {              if ($url) {
                $r->print('<a href="'.$cstrurl.'">'.                 $r->print('<a href="'.$cstrurl.'">'.
                          &mt('Construction space').'</a>');                           &mt('Construction space').'</a>');
               } else {
                   $r->print('&nbsp;');
             }              }
             $r->print('</td></tr>'."\n");              $r->print('</td>'
                        .&Apache::loncommon::end_data_table_row()
               );
         }          }
     }      }
     $r->print('</table>');      $r->print(&Apache::loncommon::end_data_table());
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
 }  }
   

Removed from v.1.89  
changed lines
  Added in v.1.90


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