version 1.1, 2004/12/10 14:57:47
|
version 1.4, 2006/04/06 22:15:19
|
Line 27
|
Line 27
|
|
|
package Apache::lonpubmenu; |
package Apache::lonpubmenu; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
|
|
sub handler { |
sub handler { |
Line 51 sub handler {
|
Line 52 sub handler {
|
nseq => 'New assembled sequence', |
nseq => 'New assembled sequence', |
ncrf => 'New custom rights file', |
ncrf => 'New custom rights file', |
nsty => 'New style file', |
nsty => 'New style file', |
|
nlib => 'New library file', |
nsub => 'New subdirectory', |
nsub => 'New subdirectory', |
renm => 'Rename current file to', |
renm => 'Rename current file to', |
move => 'Move current file to', |
move => 'Move current file to', |
Line 60 sub handler {
|
Line 62 sub handler {
|
prnt => 'Print' |
prnt => 'Print' |
); |
); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['disp']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['disp']); |
my $disp = $ENV{'form.disp'}; |
my $disp = $env{'form.disp'}; |
# set defaults for parent directory in case frameloc is unable to determine directory |
# set defaults for parent directory in case frameloc is unable to determine directory |
my $defaultdir = '/priv/'.$ENV{'user.name'}.'/'; |
my $defaultdir = '/priv/'.$env{'user.name'}.'/'; |
if ($ENV{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) { |
if ($env{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) { |
$defaultdir = '/priv/'.$1.'/'; |
$defaultdir = '/priv/'.$1.'/'; |
} |
} |
$r->print(<<"ENDONE"); |
my $js= |
<html> |
|
<head> |
|
<title>LON-CAPA Publishing Frame</title> |
|
<script type="text/javascript"> |
<script type="text/javascript"> |
//<!-- |
//<!-- |
function frameloc() { |
function frameloc() { |
Line 164 function getpostdata() {
|
Line 163 function getpostdata() {
|
ENDONE |
ENDONE |
|
|
if ($disp eq 'dir') { |
if ($disp eq 'dir') { |
$r->print(<<"ENDDIR"); |
$js .= <<"ENDDIR"; |
function getdirname() { |
function getdirname() { |
document.publishdir.filename.value=frameloc(); |
document.publishdir.filename.value=frameloc(); |
pubdir(document.publishdir) |
pubdir(document.publishdir) |
Line 199 function forcepub(theform) {
|
Line 198 function forcepub(theform) {
|
} |
} |
ENDDIR |
ENDDIR |
} else { |
} else { |
$r->print(<<"ENDRES"); |
$js.=<<"ENDRES"; |
function getfilename() { |
function getfilename() { |
document.publisher.filename.value=frameloc(); |
document.publisher.filename.value=frameloc(); |
if ((document.publisher.filename.value.charAt( |
if ((document.publisher.filename.value.charAt( |
Line 228 function getdelfilename() {
|
Line 227 function getdelfilename() {
|
} |
} |
ENDRES |
ENDRES |
} |
} |
|
my $start_page = |
|
&Apache::loncommon::start_page('Publishing Frame',$js, |
|
{'only_body' => 1,}); |
|
my $end_page = |
|
&Apache::loncommon::end_page(); |
$r->print(<<"END"); |
$r->print(<<"END"); |
//--> |
$start_page |
</script> |
|
</head> |
|
<body bgcolor="#ccffdd" text='#002200' link='#003333' vlink='#006666'> |
|
<table border="0" align="center"><tr><th bgcolor="#004400" height="20"> |
<table border="0" align="center"><tr><th bgcolor="#004400" height="20"> |
<table border="0" cellspacing="2" cellpadding="2"><tr valign="middle"> |
<table border="0" cellspacing="2" cellpadding="2"><tr valign="middle"> |
<td bgcolor="#ccddaa" align="center"> |
<td bgcolor="#ccddaa" align="center"> |
Line 329 ENDFILE
|
Line 330 ENDFILE
|
<option value="newsequencefile">$lt{'nseq'}:</option> |
<option value="newsequencefile">$lt{'nseq'}:</option> |
<option value="newrightsfile">$lt{'ncrf'}:</option> |
<option value="newrightsfile">$lt{'ncrf'}:</option> |
<option value="newstyfile">$lt{'nsty'}:</option> |
<option value="newstyfile">$lt{'nsty'}:</option> |
|
<option value="newlibraryfile">$lt{'nlib'}:</option> |
<option value="newdir">$lt{'nsub'}:</option> |
<option value="newdir">$lt{'nsub'}:</option> |
ENDOPTIONS |
ENDOPTIONS |
if ($disp ne 'dir') { |
if ($disp ne 'dir') { |
Line 348 ENDPROBOPS
|
Line 350 ENDPROBOPS
|
</th> |
</th> |
</tr> |
</tr> |
</table> |
</table> |
</body> |
$end_page |
</html> |
|
ENDPAGE |
ENDPAGE |
} |
} |
|
|