Diff for /loncom/publisher/lonpublisher.pm between versions 1.251 and 1.254

version 1.251, 2009/02/11 11:49:22 version 1.254, 2009/03/26 11:27:26
Line 1062  sub publish { Line 1062  sub publish {
      my %oldparmstores=();       my %oldparmstores=();
             
     unless ($batch) {      unless ($batch) {
      $scrout.='<h3>'.&mt('Metadata Information').' ' .       $scrout.='<h3>'.&mt('Metadata').' ' .
        &Apache::loncommon::help_open_topic("Metadata_Description")         &Apache::loncommon::help_open_topic("Metadata_Description")
        . '</h3>';         . '</h3>';
     }      }
Line 1282  END Line 1282  END
         $keywordout.='<label><input type="checkbox" name="keywords" value="'.$word.'"';          $keywordout.='<label><input type="checkbox" name="keywords" value="'.$word.'"';
         if ($metadatafields{'keywords'}) {          if ($metadatafields{'keywords'}) {
             if ($metadatafields{'keywords'}=~/\Q$word\E/) {              if ($metadatafields{'keywords'}=~/\Q$word\E/) {
                 $keywordout.=' checked="on"';                  $keywordout.=' checked="checked"';
                 $env{'form.keywords'}.=$word.',';                  $env{'form.keywords'}.=$word.',';
             }              }
         } elsif (&Apache::loncommon::keyword($word)) {          } elsif (&Apache::loncommon::keyword($word)) {
             $keywordout.=' checked="on"';              $keywordout.=' checked="checked"';
             $env{'form.keywords'}.=$word.',';              $env{'form.keywords'}.=$word.',';
         }          }
         $keywordout.=' />'.$word.'</label></td>';          $keywordout.=' />'.$word.'</label></td>';
Line 1504  sub phasetwo { Line 1504  sub phasetwo {
     return 0;      return 0;
  }   }
  if ($target=~/\.(\d+)\.(\w+)$/) {   if ($target=~/\.(\d+)\.(\w+)$/) {
     $r->print('<span class="LC_error">'.&mt('Cannot publish versioned resource, FAIL').'</span>');      $r->print('<span class="LC_error">'.&mt('Filename of resource contains internal version number. Cannot publish such resources, FAIL').'</span>');
     return 0;      return 0;
  }   }
     }      }
Line 1652  sub phasetwo { Line 1652  sub phasetwo {
                 unlink($srcd.'/'.$filename);                  unlink($srcd.'/'.$filename);
                 unlink($srcd.'/'.$filename.'.meta');                  unlink($srcd.'/'.$filename.'.meta');
             } else {              } else {
                 if ($filename=~/\Q$srcf\E\.(\d+)\.\Q$srct\E$/) {                  if ($filename=~/^\Q$srcf\E\.(\d+)\.\Q$srct\E$/) {
                     $maxversion=($1>$maxversion)?$1:$maxversion;                      $maxversion=($1>$maxversion)?$1:$maxversion;
                 }                  }
             }              }
         }          }
         closedir(DIR);          closedir(DIR);
         $maxversion++;          $maxversion++;
         $r->print('<p>Creating old version '.$maxversion.'</p>');          $r->print('<p>'.&mt('Creating old version [_1]',$maxversion).'</p>');
         print $logfile "\nCreating old version ".$maxversion."\n";          print $logfile "\nCreating old version ".$maxversion."\n";
                   
         my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct;          my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct;
Line 1772  sub phasetwo { Line 1772  sub phasetwo {
   &mt('Back to Source Directory').'</font></a></p>');    &mt('Back to Source Directory').'</font></a></p>');
     }      }
     $logfile->close();      $logfile->close();
     $r->print('<p><font color="green">'.&mt('Done').'</font></p>');      $r->print('<p class="LC_success">'.&mt('Done').'</p>');
     return 1;      return 1;
 }  }
   
Line 1839  sub batchpublish { Line 1839  sub batchpublish {
   
     my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);      my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);
             
     $r->print('<h2>'.&mt('Publishing').' <tt>'.$thisdisfn.'</tt></h2>');      $r->print('<h2>'
                .&mt('Publishing [_1]'
                    ,'<span class="LC_filename">'.$thisdisfn.'</span>')
                .'</h2>'
       );
   
 # phase one takes  # phase one takes
 #  my ($source,$target,$style,$batch)=@_;  #  my ($source,$target,$style,$batch)=@_;
Line 2169  sub handler { Line 2173  sub handler {
  my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);   my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);
         if ($thistype eq 'page') {  $thisembstyle = 'rat'; }          if ($thistype eq 'page') {  $thisembstyle = 'rat'; }
   
  $r->print('<h2>'.&mt('Publishing [_1]','<tt>'.$thisdisfn.'</tt>').'</h2>');          $r->print('<h2>'
                    .&mt('Publishing [_1]'
                        ,'<span class="LC_filename">'.$thisdisfn.'</span>')
                    .'</h2>'
           );
   
         $r->print('<h3>'.&mt('Resource Details').'</h3>');          $r->print('<h3>'.&mt('Resource Details').'</h3>');
   

Removed from v.1.251  
changed lines
  Added in v.1.254


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