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

version 1.40, 2009/05/14 15:11:00 version 1.41, 2009/08/11 15:15:01
Line 152  sub phaseone { Line 152  sub phaseone {
  my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate');   my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate');
  $r->print(&Apache::loncommon::start_data_table_row().   $r->print(&Apache::loncommon::start_data_table_row().
   '<td><input type="radio" name="version" value="'.    '<td><input type="radio" name="version" value="'.
   $version.'" /></td><td>'.&mt('Previously published version').' '.$version.'</td><td>'.    $version.'" /></td><td>'.&mt('Previously published version').' '.$version.'</td>'.
   localtime($rmtime).'</td>');                '<td>'.&Apache::lonlocal::locallocaltime($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">'.
Line 175  sub phaseone { Line 175  sub phaseone {
  my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate');   my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate');
  $r->print(&Apache::loncommon::start_data_table_row().   $r->print(&Apache::loncommon::start_data_table_row().
   '<td><input type="radio" name="version" value="new" /></td>'.    '<td><input type="radio" name="version" value="new" /></td>'.
   '<td><b>'.&mt('Currently published version').'</b></td><td>'.localtime($rmtime).    '<td><b>'.&mt('Currently published version').'</b></td>'.
   '</td>');            '<td>'.&Apache::lonlocal::locallocaltime($rmtime).'</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>');           
Line 198  sub phaseone { Line 199  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 selected 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>');
     }      }
     $r->print('<p><a href="/priv/'.$uname.$fn.'">'  
              .&mt('Back to [_1]','<span class="LC_filename">'.$fn.'</span>')      my $dir =  &Apache::loncommon::authorspace()
              .'</a></p>');                 .&File::Basename::dirname($fn)
                 .'/';
       $r->print(&Apache::lonhtmlcommon::start_funclist()
                .&Apache::lonhtmlcommon::add_item_funclist(
                     '<a href="/priv/'.$uname.$fn.'">'
                    .&mt('Back to Resource')
                    .'</a>')
                .&Apache::lonhtmlcommon::add_item_funclist(
                     '<a href="'.$dir.'">'
                    .&mt('Back to Directory')
                    .'</a>')
                .&Apache::lonhtmlcommon::end_funclist()
       );
 }  }
   
 # ---------------------------------- Interface for presenting specified version  # ---------------------------------- Interface for presenting specified version
Line 254  sub phasetwo { Line 267  sub phasetwo {
         }          }
         $r->print('</p>'          $r->print('</p>'
                  .'<p><a href="/priv/'.$uname.$fn.'">'                   .'<p><a href="/priv/'.$uname.$fn.'">'
                  .&mt('Back to [_1]',$fn)                   .&mt('Back to Resource')
                  .'</a></p>');                   .'</a></p>');
     } else {      } else {
        $r->print('<p class="LC_info">'.&mt('Please pick a version to retrieve:').'</p>');         $r->print('<p class="LC_info">'.&mt('Please pick a version to retrieve:').'</p>');
Line 321  sub handler { Line 334  sub handler {
   &Apache::loncommon::content_type($r,'text/html');    &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;    $r->send_http_header;
   
   $r->print(&Apache::loncommon::start_page('Retrieve Published Resources'));      # Breadcrumbs
       &Apache::lonhtmlcommon::clear_breadcrumbs();
       &Apache::lonhtmlcommon::add_breadcrumb({
           'text'  => 'Construction Space',
           'href'  => &Apache::loncommon::authorspace(),
       });
       &Apache::lonhtmlcommon::add_breadcrumb({
           'text'  => 'Retrieve previous version',
           'href'  => '',
       });
   
     $r->print(&Apache::loncommon::start_page('Retrieve Published Resources')
              .&Apache::lonhtmlcommon::breadcrumbs()
              .&Apache::loncommon::head_subbox(
                   &Apache::loncommon::CSTR_pageheader()) # FIXME crumbs broken?
       );
   
   $r->print('<p>'    $r->print('<p>'
            .&mt('Retrieve previous versions of [_1]'             .&mt('Retrieve previous versions of [_1]'

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


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