--- loncom/publisher/lonpublisher.pm 2009/11/24 00:59:48 1.249.2.2 +++ loncom/publisher/lonpublisher.pm 2009/07/25 06:55:31 1.261 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.249.2.2 2009/11/24 00:59:48 raeburn Exp $ +# $Id: lonpublisher.pm,v 1.261 2009/07/25 06:55:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -384,11 +384,11 @@ sub selectbox { my $selout="\n".&Apache::lonhtmlcommon::row_title($title) .''.&Apache::lonhtmlcommon::row_closure(); return $selout; @@ -1062,7 +1062,7 @@ sub publish { my %oldparmstores=(); unless ($batch) { - $scrout.='
'.&mt('Obsolete parameters or saved values').': '. - $chparms.'
'. - &mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'
'.&mt('Obsolete parameters or saved values').': ' + .$chparms.'
' + .''.&mt('Warning!').'
'
+ .&mt('If this resource is in active use, student performance data from the previous version may become inaccessible.')
+ .'
'. - &mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.').'
'.&mt('Warning!').'
'
+ .&mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.')
+ .'
Creating old version '.$maxversion.'
'); + $r->print(''.&mt('Creating old version [_1]',$maxversion).'
'); print $logfile "\nCreating old version ".$maxversion."\n"; my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; @@ -1709,8 +1710,12 @@ sub phasetwo { $path.="/$parts[$count]"; if ((-e $path)!=1) { print $logfile "\nCreating directory ".$path; - $r->print(''.&mt('Created directory').' '.$parts[$count].'
'); mkdir($path,0777); + $r->print('' + .&mt('Created directory [_1]' + ,''.$parts[$count].'') + .'
' + ); } } @@ -1753,9 +1758,12 @@ sub phasetwo { &Apache::lonnet::devalidate_cache_new('meta', &Apache::lonnet::declutter($thisdistarget)); +# ------------------------------------------------------------- Everything done + $logfile->close(); + $r->print(''.&mt('Done').'
'); + # ------------------------------------------------ Provide link to new resource unless ($batch) { - my $thissrc=$source; $thissrc=~s{^/home/($match_username)/public_html}{/priv/$1}; @@ -1772,8 +1780,6 @@ sub phasetwo { '">'. &mt('Back to Source Directory').''); } - $logfile->close(); - $r->print(''.&mt('Done').'
'); return 1; } @@ -1840,7 +1846,11 @@ sub batchpublish { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); - $r->print(''.&mt('Created directory').' '.$parts[$count].'
'); mkdir($path,0777); + $r->print('' + .&mt('Created directory [_1]' + ,''.$parts[$count].'') + .'
' + ); } } @@ -1985,7 +2013,7 @@ sub defaultmetapublish { # ------------------------------------------------------------------- Link back my $link=$fn; $link=~s/^\/home\/$cuname\/public_html\//\/priv\/$cuname\//; - $r->print("".&mt('Back to Catalog Information').''); + $r->print("".&mt('Back to Metadata').''); $r->print(&Apache::loncommon::end_page()); return OK; } @@ -2136,10 +2164,25 @@ sub handler { &Apache::loncommon::content_type($r,'text/html'); $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=''; - $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()) # FIXME crumbs broken? + ); my $thisfn=$fn; @@ -2170,7 +2213,11 @@ sub handler { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); if ($thistype eq 'page') { $thisembstyle = 'rat'; } - $r->print('