version 1.105, 2007/11/02 19:24:44
|
version 1.109, 2008/07/29 10:06:27
|
Line 105 sub handler {
|
Line 105 sub handler {
|
my $numres = 0; |
my $numres = 0; |
|
|
# Start off the directory table. |
# Start off the directory table. |
$r->print('<h3>Directory Contents:</h3>'); |
$r->print('<h3>'.&mt('Directory Contents:').'</h3>'); |
$r->print('<table id="LC_browser"><tr>'. |
$r->print('<table id="LC_browser"><tr>'. |
'<th>'.&mt('Type').'</th>'. |
'<th>'.&mt('Type').'</th>'. |
'<th>'.&mt('Actions').'</th>'. |
'<th>'.&mt('Actions').'</th>'. |
Line 197 sub startpage {
|
Line 197 sub startpage {
|
my $formaction='/priv/'.$uname.$thisdisfn.'/'; |
my $formaction='/priv/'.$uname.$thisdisfn.'/'; |
$formaction=~s|/+|/|g; |
$formaction=~s|/+|/|g; |
my $pagetitle .= &Apache::loncommon::help_open_menu('','',3,'Authoring'). |
my $pagetitle .= &Apache::loncommon::help_open_menu('','',3,'Authoring'). |
'<font face="Arial, Helvetica, sans-serif" size="+1"><b>Construction Space</b>:</font> '. |
'<font face="Arial, Helvetica, sans-serif" size="+1"><b>'.&mt('Construction Space').'</b>:</font> '. |
'<form name="dirs" method="post" action="'.$formaction. |
'<form name="dirs" method="post" action="'.$formaction. |
'" target="_parent"><tt><b>'. |
'" target="_parent"><tt><b>'. |
&Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/','_top','/priv','','+1',1)."</b></tt><br />". |
&Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/','_top','/priv','','+1',1)."</b></tt><br />". |
Line 217 sub startpage {
|
Line 217 sub startpage {
|
} |
} |
|
|
my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn); |
my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn); |
|
my $doctitle = 'LON-CAPA '.&mt('Construction Space'); |
|
my $newname = &mt('New Name'); |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
my $pubdirscript=(<<ENDPUBDIRSCRIPT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
top.document.title = '$esc_thisdisfn/ - LON-CAPA Construction Space'; |
top.document.title = '$esc_thisdisfn/ - $doctitle'; |
// Store directory location for menu bar to find |
// Store directory location for menu bar to find |
|
|
parent.lastknownpriv='/~$uname$esc_thisdisfn/'; |
parent.lastknownpriv='/~$uname$esc_thisdisfn/'; |
Line 313 parent.lastknownpriv='/~$uname$esc_thisd
|
Line 315 parent.lastknownpriv='/~$uname$esc_thisd
|
} |
} |
function changename(theform,activity) { |
function changename(theform,activity) { |
var oldname=theform.dispfilename.value; |
var oldname=theform.dispfilename.value; |
var newname=prompt('New Name',oldname); |
var newname=prompt('$newname',oldname); |
if (newname == "" || !newname || newname == oldname) { |
if (newname == "" || !newname || newname == oldname) { |
return |
return |
} |
} |
Line 369 sub dircontrols {
|
Line 371 sub dircontrols {
|
updc => 'Upload a new document', |
updc => 'Upload a new document', |
pick => 'Please select an action to perform using the new filename', |
pick => 'Please select an action to perform using the new filename', |
); |
); |
|
my $mytype = $lt{'type'}; # avoid conflict with " and ' in javascript |
$r->print(<<END); |
$r->print(<<END); |
<table id="LC_cstr_controls"> |
<table id="LC_cstr_controls"> |
<tr> |
<tr> |
Line 429 sub dircontrols {
|
Line 432 sub dircontrols {
|
<option value="newtaskfile">$lt{'nbt'}:</option> |
<option value="newtaskfile">$lt{'nbt'}:</option> |
<option value="newlibraryfile">$lt{'nlib'}:</option> |
<option value="newlibraryfile">$lt{'nlib'}:</option> |
<option value="newdir">$lt{'nsub'}:</option> |
<option value="newdir">$lt{'nsub'}:</option> |
</select> <input type="text" name="newfilename" value="Type Name Here" onfocus="if (this.value == 'Type Name Here') this.value=''" /> <input type="button" value="Go" onclick="validate_go();" /> |
</select> <input type="text" name="newfilename" value="$lt{'type'}" onfocus="if (this.value == '$mytype') this.value=''" /> <input type="button" value="Go" onclick="validate_go();" /> |
</span> |
</span> |
</form> |
</form> |
</td> |
</td> |
Line 538 sub putdirectory {
|
Line 541 sub putdirectory {
|
)); |
)); |
my $actionitem = ''; |
my $actionitem = ''; |
if ($dirname eq '..') { |
if ($dirname eq '..') { |
$actionitem = 'Go to ...'; |
$actionitem = &mt('Go to ...'); |
} else { |
} else { |
$actionitem = |
$actionitem = |
'<form name="dirselect_'.$$numdir. |
'<form name="dirselect_'.$$numdir. |