--- loncom/publisher/lonpubdir.pm 2004/10/29 18:40:40 1.64 +++ loncom/publisher/lonpubdir.pm 2004/11/30 19:08:18 1.66 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.64 2004/10/29 18:40:40 raeburn Exp $ +# $Id: lonpubdir.pm,v 1.66 2004/11/30 19:08:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,10 +91,10 @@ sub handler { my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom); &startpage($r, $uname, $udom, $thisdisfn); # Put out the start of page. - - &dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, + if ($ENV{'environment.remote'} eq 'off') { + &dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, # browse/upload + new file page. - + } &resourceactions($r,$uname,$udom,$thisdisfn); #Put out form used for printing/deletion etc. my $numdir = 0; @@ -192,21 +192,24 @@ sub startpage { $r->print('LON-CAPA Construction Space'); - my $pagetitle; - my $formaction='/priv/'.$uname.'/'.$thisdisfn; + my $pagetitle; + my $formaction='/priv/'.$uname.'/'.$thisdisfn.'/'; $formaction=~s/\/+/\//g; - $pagetitle .= ('
'. + $pagetitle .= &Apache::loncommon::help_open_menu('','','','',3,'Authoring'). 'Construction Space: '. - &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'top','/priv','','-1'). + ''. + &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn.'/','_top','/priv','','+1'). &Apache::lonhtmlcommon::select_recent('construct','recent', 'this.form.action=this.form.recent.value;this.form.submit()'). - '
'); - &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); - - $r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle)); - - $r->print(&Apache::loncommon::help_open_menu('','','','',3,'Authoring')); + ''; + &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); + if ($ENV{'environment.remote'} eq 'off') { + $ENV{'request.noversionuri'}=$currdir; + $r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle)); + } else { + $r->print($pagetitle); + } my $pubdirscript=(< // Store directory location for menu bar to find @@ -225,7 +228,7 @@ parent.lastknownpriv='/~$uname/$thisdisf pubrecdir(document.publishdir) } if (theform.dirtask.options[theform.dirtask.selectedIndex].value == 'editcat') { - window.location=theform.filename.value+'default.meta' + top.location=theform.filename.value+'default.meta' } if (theform.dirtask.options[theform.dirtask.selectedIndex].value == 'printdir' ) { document.printdir.postdata.value=theform.filename.value @@ -263,7 +266,7 @@ parent.lastknownpriv='/~$uname/$thisdisf function SetPubDir(theform,printForm) { if (theform.diraction.options[theform.diraction.selectedIndex].value == "open") { - window.location = theform.filename.value + top.location = theform.filename.value return } if (theform.diraction.options[theform.diraction.selectedIndex].value == "publish") { @@ -273,7 +276,7 @@ parent.lastknownpriv='/~$uname/$thisdisf pubrecdir(theform) } if (theform.diraction.options[theform.diraction.selectedIndex].value == "editcat") { - window.location=theform.filename.value+'default.meta' + top.location=theform.filename.value+'default.meta' } if (theform.diraction.options[theform.diraction.selectedIndex].value == "print") { theform.action = '/adm/printout' @@ -367,9 +370,9 @@ sub dircontrols { $r->print(< - Actions for current directory - Upload a new document - Create a new directory or LON-CAPA document + Actions for current directory + Upload a new document + Create a new directory or LON-CAPA document