--- loncom/publisher/loncfile.pm 2010/04/13 22:28:42 1.100.2.4 +++ loncom/publisher/loncfile.pm 2009/05/28 17:08:38 1.101 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.100.2.4 2010/04/13 22:28:42 raeburn Exp $ +# $Id: loncfile.pm,v 1.101 2009/05/28 17:08:38 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -363,14 +363,14 @@ sub cleanDest { if (! -d "$newpath") { $request->print('

' .&mt("You have requested to create file in directory [_1] which doesn't exist. The requested directory path has been removed from the requested file name." - ,&display($newpath)) + ,''.&display($newpath).'') .'

'); $dest=~s|.*/||; } } if ($dest =~ /\.(\d+)\.(\w+)$/){ $request->print('

' - .&mt('Bad filename [_1]',&display($dest)) + .&mt('Bad filename [_1]',''.&display($dest).'') .'
' .&mt('[_1](name).(number).(extension)[_2] not allowed.','','') .'
' @@ -552,9 +552,8 @@ sub Rename1 { $request->print('' .'

' - .&mt($action.' [_1] to [_2]?', - &display($fn), - &display($newfilename)) + .&mt($action.' [_1] to [_2]?' + ,&display($fn),&display($newfilename)) .'

' ); &CloseForm1($request, $fn); @@ -564,8 +563,8 @@ sub Rename1 { } } else { $request->print('

' - .&mt('No such file: [_1]', - &display($fn)) + .&mt('No such file: [_1]' + ,''.&display($fn).'') .'

' ); return; @@ -626,15 +625,15 @@ sub Delete1 { } } $request->print('

' - .&mt('Delete [_1]?', - &display($fn)) + .&mt('Delete [_1]?' + ,''.&display($fn).'') .'

' ); &CloseForm1($request, $fn); } else { $request->print('

' - .&mt('No such file: [_1]', - &display($fn)) + .&mt('No such file: [_1]' + ,''.&display($fn).'') .'

' ); } @@ -690,21 +689,19 @@ sub Copy1 { $request->print('
'.&mt('Cancel').''); return; } - - $request->print( - '' - .'

' - .&mt('Copy [_1] to [_2]?', - &display($fn), - &display($newfilename)) - .'

' + $request->print('' + .'

' + .&mt('Copy [_1] to [_2]?' + ,''.&display($fn).'' + ,''.&display($newfilename).'') + .'

' ); &CloseForm1($request, $fn); } else { $request->print('

' - .&mt('No such file: [_1]', - &display($fn)) + .&mt('No such file: [_1]' + ,''.&display($fn).'') .'

' ); } @@ -765,8 +762,8 @@ sub NewDir1 { $request->print('' .'

' - .&mt('Make new directory [_1]?', - &display($newfilename)) + .&mt('Make new directory [_1]?' + ,''.&display($newfilename).'') .'

' ); &CloseForm1($request, $fn); @@ -779,15 +776,15 @@ sub Decompress1 { if( -e $fn) { $request->print(''); $request->print('

' - .&mt('Decompress [_1]?', - &display($fn)) + .&mt('Decompress [_1]?' + ,''.&display($fn).'') .'

' ); &CloseForm1($request, $fn); } else { $request->print('

' - .&mt('No such file: [_1]', - &display($fn)) + .&mt('No such file: [_1]' + ,''.&display($fn).'') .'

' ); } @@ -858,8 +855,7 @@ sub NewFile1 { $extension = $1; } - my @okexts = qw(xml html xhtml htm xhtm problem page sequence rights sty task library js css txt); - + my @okexts = qw(xml html xhtml htm xhtm problem page sequence rights sty library js css txt); if (($extension eq '') || (!grep(/^\Q$extension\E/,@okexts))) { my $validexts = '.'.join(', .',@okexts); $request->print('

'. @@ -1074,8 +1070,8 @@ sub Rename2 { } } else { $request->print('

' - .&mt('No such file: [_1]', - &display($oldfile)) + .&mt('No such file: [_1]' + ,''.&display($oldfile).'') .'

' ); return 0; @@ -1450,10 +1446,26 @@ function writeDone() { $loaditem{'onload'} = "writeDone()"; } + # Breadcrumbs + &Apache::lonhtmlcommon::clear_breadcrumbs(); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'Construction Space', + 'href' => &Apache::loncommon::authorspace(), + }); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'File Operation', + 'title' => 'Construction Space File Operation', + 'href' => '', + }); + $r->print(&Apache::loncommon::start_page('Construction Space File Operation', $js, - {'add_entries' => \%loaditem,})); - + {'add_entries' => \%loaditem,}) + .&Apache::lonhtmlcommon::breadcrumbs() + .&Apache::loncommon::head_subbox( + &Apache::loncommon::CSTR_pageheader()) + ); + $r->print('

'.&mt('Location').': '.&display($fn).'

'); if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {