--- loncom/publisher/lonpubdir.pm 2008/01/16 12:08:04 1.106 +++ loncom/publisher/lonpubdir.pm 2008/12/21 04:36:58 1.110.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.106 2008/01/16 12:08:04 bisitz Exp $ +# $Id: lonpubdir.pm,v 1.110.2.1 2008/12/21 04:36:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -156,7 +156,7 @@ sub getEffectiveUrl { # Replace the ~username of the URL with /home/username/public_html # so that we don't have to worry about ~ expansion internally. # - $fn=~s/^http\:\/\/[^\/]+\///; + $fn=~s/^https?\:\/\/[^\/]+\///; $fn=~s/^\///; $fn=~s{~($LONCAPA::username_re)}{/home/$1/public_html}; @@ -207,19 +207,21 @@ sub startpage { &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); if ($env{'environment.remote'} eq 'off') { $env{'request.noversionuri'}=$currdir.'/'; - $r->print(&Apache::loncommon::start_page(&mt('Construction Space'),undef, + $r->print(&Apache::loncommon::start_page('Construction Space',undef, {'body_title' => $pagetitle,})); } else { - $r->print(&Apache::loncommon::start_page(&mt('Construction Space'),undef, + $r->print(&Apache::loncommon::start_page('Construction Space',undef, { 'only_body' => 1,})); $r->print($pagetitle); } my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn); + my $doctitle = 'LON-CAPA '.&mt('Construction Space'); + my $newname = &mt('New Name'); my $pubdirscript=(< -top.document.title = '$esc_thisdisfn/ - '.&mt('LON-CAPA Construction Space'); +top.document.title = '$esc_thisdisfn/ - $doctitle'; // Store directory location for menu bar to find parent.lastknownpriv='/~$uname$esc_thisdisfn/'; @@ -313,7 +315,7 @@ parent.lastknownpriv='/~$uname$esc_thisd } function changename(theform,activity) { var oldname=theform.dispfilename.value; - var newname=prompt('New Name',oldname); + var newname=prompt('$newname',oldname); if (newname == "" || !newname || newname == oldname) { return } @@ -539,7 +541,7 @@ sub putdirectory { )); my $actionitem = ''; if ($dirname eq '..') { - $actionitem = 'Go to ...'; + $actionitem = &mt('Go to ...'); } else { $actionitem = '
'. - ($$bombs{$targetdir.'/'.$filename}?'bomb':'Edit Metadata').''; + ($$bombs{$targetdir.'/'.$filename}?''.&mt('bomb').'':&mt('Edit Metadata')).''; if (!$meta_same) { $title = &mt('Metadata Modified').'
'.$title.