Diff for /loncom/publisher/lonretrieve.pm between versions 1.36 and 1.40

version 1.36, 2008/11/20 18:03:55 version 1.40, 2009/05/14 15:11:00
Line 120  sub phaseone { Line 120  sub phaseone {
     my ($main,$suffix,$is_meta) = &get_file_info($fn);      my ($main,$suffix,$is_meta) = &get_file_info($fn);
           
     if (-e $resfn) {        if (-e $resfn) {  
  $r->print('<form action="/adm/retrieve" method="POST">'.   $r->print('<form action="/adm/retrieve" method="post">'.
   '<input type="hidden" name="filename" value="/~'.$uname.$fn.'" />'.    '<input type="hidden" name="filename" value="/~'.$uname.$fn.'" />'.
   '<input type="hidden" name="phase" value="two" />'.    '<input type="hidden" name="phase" value="two" />'.
   &Apache::loncommon::start_data_table().    &Apache::loncommon::start_data_table().
Line 156  sub phaseone { Line 156  sub phaseone {
   localtime($rmtime).'</td>');    localtime($rmtime).'</td>');
   
  if (!$is_meta) {   if (!$is_meta) {
     $r->print('<td><a href="'.$urldir.$filename.'.meta" target=cat>'.      $r->print('<td><a href="'.$urldir.$filename.'.meta" target="cat">'.
       &mt('Metadata Version').' '.$version.'</a></td>');        &mt('Metadata Version').' '.$version.'</a></td>');
  }   }
  if ($is_meta   if ($is_meta
Line 178  sub phaseone { Line 178  sub phaseone {
   '<td><b>'.&mt('Currently published version').'</b></td><td>'.localtime($rmtime).    '<td><b>'.&mt('Currently published version').'</b></td><td>'.localtime($rmtime).
   '</td>');    '</td>');
  if (!$is_meta) {   if (!$is_meta) {
     $r->print('<td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target=cat>'.      $r->print('<td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target="cat">'.
       &mt('Metadata current version').'</a></td>');                   &mt('Metadata current version').'</a></td>');           
  }   }
  if ($is_meta    if ($is_meta 
Line 198  sub phaseone { Line 198  sub phaseone {
       &mt('This will only retrieve the resource. If you want to retrieve the metadata, you will need to do that separately.').        &mt('This will only retrieve the resource. If you want to retrieve the metadata, you will need to do that separately.').
       '</span></p>');        '</span></p>');
  }   }
  $r->print('<input type="submit" value="'.&mt('Retrieve version').'" /></form>');   $r->print('<input type="submit" value="'.&mt('Retrieve Version').'" /></form>');
     } else {      } else {
  $r->print('<p class="LC_warning">'.&mt('No previous versions published.').'</p>');   $r->print('<p class="LC_warning">'.&mt('No previous versions published.').'</p>');
     }      }
Line 289  sub handler { Line 289  sub handler {
   
   if ($env{'form.filename'}) {    if ($env{'form.filename'}) {
       $fn=$env{'form.filename'};        $fn=$env{'form.filename'};
       $fn=~s/^http\:\/\/[^\/]+//;        $fn=~s/^https?\:\/\/[^\/]+//;
   } else {    } else {
      $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.       $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.
          ' unspecified filename for retrieval', $r->filename);            ' unspecified filename for retrieval', $r->filename); 
Line 323  sub handler { Line 323  sub handler {
   
   $r->print(&Apache::loncommon::start_page('Retrieve Published Resources'));    $r->print(&Apache::loncommon::start_page('Retrieve Published Resources'));
   
       $r->print('<p>'
   $r->print('<h1>'  
            .&mt('Retrieve previous versions of [_1]'             .&mt('Retrieve previous versions of [_1]'
                    ,'<span class="LC_filename">'.$fn.'</span>')                     ,'<span class="LC_filename">'.$fn.'</span>')
            .'</h1>');             .'</p>');
       
   if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {    if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
           $r->print('<h3><span class="LC_diff_coauthor">'.&mt('Co-Author').': '.$uname.            $r->print('<p><span class="LC_warning">'
     &mt(' at ').$udom.                     .&mt('Co-Author [_1]'
                '</span></h3>');                         ,&Apache::loncommon::plainname($uname,$udom)
                          .' ('.$uname.':'.$udom.')')
                      .'</span></p>');
   }    }
   
   

Removed from v.1.36  
changed lines
  Added in v.1.40


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