--- loncom/publisher/lonpubdir.pm 2004/12/07 22:40:09 1.71 +++ loncom/publisher/lonpubdir.pm 2005/01/24 21:55:20 1.76 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.71 2004/12/07 22:40:09 raeburn Exp $ +# $Id: lonpubdir.pm,v 1.76 2005/01/24 21:55:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -94,6 +94,8 @@ sub handler { if ($ENV{'environment.remote'} eq 'off') { &dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, # browse/upload + new file page. + } else { + &pubbuttons($r,$uname,$thisdisfn); } &resourceactions($r,$uname,$udom,$thisdisfn); #Put out form used for printing/deletion etc. @@ -212,6 +214,7 @@ sub startpage { } my $pubdirscript=(< +top.document.title = '$thisdisfn/ - LON-CAPA Construction Space'; // Store directory location for menu bar to find parent.lastknownpriv='/~$uname$thisdisfn/'; @@ -251,7 +254,7 @@ parent.lastknownpriv='/~$uname$thisdisfn } function forcepub(theform) { - if (confirm('Force publication of unmodified files? - OK=yes; Cancel=No.')) { + if (confirm('Force publication of unmodified files? - Cancel=No; OK=yes.')) { theform.forcerepub.value="ON"; } } @@ -266,7 +269,7 @@ parent.lastknownpriv='/~$uname$thisdisfn function SetPubDir(theform,printForm) { if (theform.diraction.options[theform.diraction.selectedIndex].value == "open") { - top.location = theform.filename.value + top.location = theform.openname.value return } if (theform.diraction.options[theform.diraction.selectedIndex].value == "publish") { @@ -330,7 +333,8 @@ parent.lastknownpriv='/~$uname$thisdisfn ENDPUBDIRSCRIPT $r->print($pubdirscript); - if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) { + if ((($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) && + $ENV{'environment.remote'} ne 'off') { $r->print('

'.&mt('Co-Author').': '.$uname.' at '.$udom. '

'); } @@ -396,6 +400,22 @@ sub dircontrols { END } +sub pubbuttons { + my ($r,$uname,$thisdisfn) = @_; + $r->print('
'. + '
'. + ''. + ''. + ''. + ''. +'
'); +} + sub resourceactions { my ($r,$uname,$udom,$thisdisfn) = @_; $r->print(<'.&mt('Print directory'). ''. ''. + ''. ''. ''. ''.