Diff for /loncom/publisher/lonpublisher.pm between versions 1.258.2.4 and 1.267.2.1

version 1.258.2.4, 2010/01/27 03:44:48 version 1.267.2.1, 2011/11/07 13:38:45
Line 1121  sub publish { Line 1121  sub publish {
 # ------------------------------------------------------------- Save some stuff  # ------------------------------------------------------------- Save some stuff
         my %savemeta=();          my %savemeta=();
         foreach ('title') {          foreach ('title') {
             $savemeta{$_}=$metadatafields{$_};              if ($metadatafields{$_}) { $savemeta{$_}=$metadatafields{$_}; }
  }   }
 # ------------------------------------------ See if anything new in file itself  # ------------------------------------------ See if anything new in file itself
     
Line 1223  sub publish { Line 1223  sub publish {
     my $intr_scrout.='<br />'      my $intr_scrout.='<br />'
                     .'<form name="pubform" action="/adm/publish" method="post">';                      .'<form name="pubform" action="/adm/publish" method="post">';
     unless ($env{'form.makeobsolete'}) {      unless ($env{'form.makeobsolete'}) {
          my $thissrc=$source;
          $thissrc=~s{^/home/($match_username)/public_html}{/priv/$1};
        $intr_scrout.='<p class="LC_warning">'         $intr_scrout.='<p class="LC_warning">'
                     .&mt('Searching for your resource will be based on the following metadata. Please provide as much data as possible.')                      .&mt('Searching for your resource will be based on the following metadata. Please provide as much data as possible.')
                     .'</p>'                      .'</p>'
                     .'<p><input type="submit" value="'                      .'<p><input type="submit" value="'
                     .&mt('Finalize Publication')                      .&mt('Finalize Publication')
                     .'" /></p>';                      .'" /> <a href="'.$thissrc.'">'.&mt('Cancel').'</a></p>';
     }      }
     $intr_scrout.=&Apache::lonhtmlcommon::start_pick_box();      $intr_scrout.=&Apache::lonhtmlcommon::start_pick_box();
     $intr_scrout.=      $intr_scrout.=
Line 1687  sub phasetwo { Line 1689  sub phasetwo {
             if (-e $target.'.meta') {              if (-e $target.'.meta') {
                 $r->print(&Apache::lonhtmlcommon::confirm_success(                  $r->print(&Apache::lonhtmlcommon::confirm_success(
                            &mt('Failed to write old metadata copy').", $!",1));                             &mt('Failed to write old metadata copy').", $!",1));
   
  return 0;   return 0;
     }      }
         }          }
Line 1727  sub phasetwo { Line 1728  sub phasetwo {
     &mt('Failed to copy source').", $!",1));      &mt('Failed to copy source').", $!",1));
  return 0;   return 0;
     }      }
       
 # ---------------------------------------------- Delete local tmp-preview files  # ---------------------------------------------- Delete local tmp-preview files
     unlink($copyfile.'.tmp');      unlink($copyfile.'.tmp');
 # --------------------------------------------------------------- Copy Metadata  # --------------------------------------------------------------- Copy Metadata
Line 1771  sub phasetwo { Line 1772  sub phasetwo {
                   
         my $thissrcdir=$thissrc;          my $thissrcdir=$thissrc;
         $thissrcdir=~s/\/[^\/]+$/\//;          $thissrcdir=~s/\/[^\/]+$/\//;
            
         $r->print(          $r->print(&Apache::loncommon::head_subbox(
            '<hr /><a href="'.$thisdistarget.'"><font size="+2">'.              &Apache::lonhtmlcommon::start_funclist().
            &mt('View Published Version').'</font></a>'.              &Apache::lonhtmlcommon::add_item_funclist(
            '<p><a href="'.$thissrc.'"><font size="+2">'.                  '<a href="'.$thisdistarget.'">'.
   &mt('Back to Source').'</font></a></p>'.                  &mt('View Published Version').
            '<p><a href="'.$thissrcdir.                  '</a>').
                    '"><font size="+2">'.              &Apache::lonhtmlcommon::add_item_funclist(
   &mt('Back to Source Directory').'</font></a></p>');                  '<a href="'.$thissrc.'">'.
                   &mt('Back to Source').
                   '</a>').
               &Apache::lonhtmlcommon::add_item_funclist(
                   '<a href="'.$thissrcdir.'">'.
                   &mt('Back to Source Directory').
                   '</a>').
               &Apache::lonhtmlcommon::end_funclist())
           );
     }      }
     return 1;      return 1;
 }  }
Line 2165  sub handler { Line 2174  sub handler {
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
           
       # Breadcrumbs
       &Apache::lonhtmlcommon::clear_breadcrumbs();
       &Apache::lonhtmlcommon::add_breadcrumb({
           'text'  => 'Construction Space',
           'href'  => &Apache::loncommon::authorspace(),
       });
       &Apache::lonhtmlcommon::add_breadcrumb({
           'text'  => 'Resource Publication',
           'href'  => '',
       });
   
     my $js='<script type="text/javascript">'.      my $js='<script type="text/javascript">'.
  &Apache::loncommon::browser_and_searcher_javascript().   &Apache::loncommon::browser_and_searcher_javascript().
  '</script>';   '</script>';
     $r->print(&Apache::loncommon::start_page('Resource Publication',$js));      $r->print(&Apache::loncommon::start_page('Resource Publication',$js)
                .&Apache::lonhtmlcommon::breadcrumbs()
                .&Apache::loncommon::head_subbox(
                     &Apache::loncommon::CSTR_pageheader($fn))
       );
   
   
     my $thisfn=$fn;      my $thisfn=$fn;
Line 2269  ENDDIFF Line 2293  ENDDIFF
     }      }
  } else {   } else {
     &phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget);       &phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); 
     $r->print('<hr />');  
  }   }
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());

Removed from v.1.258.2.4  
changed lines
  Added in v.1.267.2.1


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