version 1.64, 2004/10/29 18:40:40
|
version 1.66, 2004/11/30 19:08:18
|
Line 91 sub handler {
|
Line 91 sub handler {
|
my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom); |
my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom); |
|
|
&startpage($r, $uname, $udom, $thisdisfn); # Put out the start of page. |
&startpage($r, $uname, $udom, $thisdisfn); # Put out the start of page. |
|
if ($ENV{'environment.remote'} eq 'off') { |
&dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, |
&dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory, |
# browse/upload + new file page. |
# browse/upload + new file page. |
|
} |
&resourceactions($r,$uname,$udom,$thisdisfn); #Put out form used for printing/deletion etc. |
&resourceactions($r,$uname,$udom,$thisdisfn); #Put out form used for printing/deletion etc. |
|
|
my $numdir = 0; |
my $numdir = 0; |
Line 192 sub startpage {
|
Line 192 sub startpage {
|
|
|
$r->print('<html><head><title>LON-CAPA Construction Space</title></head>'); |
$r->print('<html><head><title>LON-CAPA Construction Space</title></head>'); |
|
|
my $pagetitle; |
my $pagetitle; |
my $formaction='/priv/'.$uname.'/'.$thisdisfn; |
my $formaction='/priv/'.$uname.'/'.$thisdisfn.'/'; |
$formaction=~s/\/+/\//g; |
$formaction=~s/\/+/\//g; |
$pagetitle .= ('<form name="dirs" method="post" action="'.$formaction |
$pagetitle .= &Apache::loncommon::help_open_menu('','','','',3,'Authoring'). |
.'" target="_parent">'. |
|
'<font face="Arial, Helvetica, sans-serif"><b>Construction Space</b>:</font> '. |
'<font face="Arial, Helvetica, sans-serif"><b>Construction Space</b>:</font> '. |
&Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'top','/priv','','-1'). |
'<form name="dirs" method="post" action="'.$formaction. |
|
'" target="_parent">'. |
|
&Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn.'/','_top','/priv','','+1'). |
&Apache::lonhtmlcommon::select_recent('construct','recent', |
&Apache::lonhtmlcommon::select_recent('construct','recent', |
'this.form.action=this.form.recent.value;this.form.submit()'). |
'this.form.action=this.form.recent.value;this.form.submit()'). |
'</form>'); |
'</form>'; |
&Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); |
&Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); |
|
if ($ENV{'environment.remote'} eq 'off') { |
$r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle)); |
$ENV{'request.noversionuri'}=$currdir; |
|
$r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle)); |
$r->print(&Apache::loncommon::help_open_menu('','','','',3,'Authoring')); |
} else { |
|
$r->print($pagetitle); |
|
} |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
<script> |
<script> |
// Store directory location for menu bar to find |
// Store directory location for menu bar to find |
Line 225 parent.lastknownpriv='/~$uname/$thisdisf
|
Line 228 parent.lastknownpriv='/~$uname/$thisdisf
|
pubrecdir(document.publishdir) |
pubrecdir(document.publishdir) |
} |
} |
if (theform.dirtask.options[theform.dirtask.selectedIndex].value == 'editcat') { |
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' ) { |
if (theform.dirtask.options[theform.dirtask.selectedIndex].value == 'printdir' ) { |
document.printdir.postdata.value=theform.filename.value |
document.printdir.postdata.value=theform.filename.value |
Line 263 parent.lastknownpriv='/~$uname/$thisdisf
|
Line 266 parent.lastknownpriv='/~$uname/$thisdisf
|
|
|
function SetPubDir(theform,printForm) { |
function SetPubDir(theform,printForm) { |
if (theform.diraction.options[theform.diraction.selectedIndex].value == "open") { |
if (theform.diraction.options[theform.diraction.selectedIndex].value == "open") { |
window.location = theform.filename.value |
top.location = theform.filename.value |
return |
return |
} |
} |
if (theform.diraction.options[theform.diraction.selectedIndex].value == "publish") { |
if (theform.diraction.options[theform.diraction.selectedIndex].value == "publish") { |
Line 273 parent.lastknownpriv='/~$uname/$thisdisf
|
Line 276 parent.lastknownpriv='/~$uname/$thisdisf
|
pubrecdir(theform) |
pubrecdir(theform) |
} |
} |
if (theform.diraction.options[theform.diraction.selectedIndex].value == "editcat") { |
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") { |
if (theform.diraction.options[theform.diraction.selectedIndex].value == "print") { |
theform.action = '/adm/printout' |
theform.action = '/adm/printout' |
Line 367 sub dircontrols {
|
Line 370 sub dircontrols {
|
$r->print(<<END); |
$r->print(<<END); |
<table cellspacing="4" cellpadding="4" width="100%"> |
<table cellspacing="4" cellpadding="4" width="100%"> |
<tr> |
<tr> |
<th bgcolor="#DDDDDD">Actions for current directory</th> |
<td bgcolor="#DDDDDD" align="middle"><b>Actions for current directory</b></td> |
<th bgcolor="#DDDDDD">Upload a new document</th> |
<td bgcolor="#DDDDDD" align="middle"><b>Upload a new document</b></td> |
<th bgcolor="#DDDDDD">Create a new directory or LON-CAPA document</th> |
<td bgcolor="#DDDDDD" align="middle"><b>Create a new directory or LON-CAPA document</b></td> |
</tr> |
</tr> |
<tr> |
<tr> |
<td bgcolor="#ccddaa" valign="top" align="center"> |
<td bgcolor="#ccddaa" valign="top" align="center"> |