version 1.70, 2003/07/21 18:35:25
|
version 1.76, 2003/09/23 00:26:10
|
Line 86 my @Omit = ();
|
Line 86 my @Omit = ();
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
my $c = $r->connection(); |
my $c = $r->connection(); |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::no_cache($r); |
&Apache::loncommon::no_cache($r); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
Line 320 END
|
Line 320 END
|
<script type="text/javascript"> |
<script type="text/javascript"> |
$catalogmodefunctions |
$catalogmodefunctions |
function openWindow(url, wdwName, w, h, toolbar,scrollbar,locationbar) { |
function openWindow(url, wdwName, w, h, toolbar,scrollbar,locationbar) { |
var options = "width=" + w + ",height=" + h + ","; |
var xpos = (screen.width-w)/2; |
|
xpos = (xpos < 0) ? '0' : xpos; |
|
var ypos = (screen.height-h)/2-30; |
|
ypos = (ypos < 0) ? '0' : ypos; |
|
var options = "width=" + w + ",height=" + h + ",screenx="+xpos+",screeny="+ypos+","; |
options += "resizable=yes,scrollbars="+scrollbar+",status=no,"; |
options += "resizable=yes,scrollbars="+scrollbar+",status=no,"; |
options += "menubar=no,toolbar="+toolbar+",location="+locationbar+",directories=no"; |
options += "menubar=no,toolbar="+toolbar+",location="+locationbar+",directories=no"; |
var newWin = window.open(url, wdwName, options); |
var newWin = window.open(url, wdwName, options); |
Line 333 function gothere(val) {
|
Line 337 function gothere(val) {
|
|
|
</head> |
</head> |
ENDHEADER |
ENDHEADER |
$r->print(&Apache::loncommon::bodytag('Browse Resources')); |
my ($headerdom)=($uri=~/^\/res\/(\w+)\//); |
|
$r->print(&Apache::loncommon::bodytag('Browse Resources',undef,undef,undef, |
|
$headerdom)); |
# - Evaluate actions from previous page (both cumulatively and chronologically) |
# - Evaluate actions from previous page (both cumulatively and chronologically) |
if ($ENV{'form.catalogmode'} eq 'groupimport') { |
if ($ENV{'form.catalogmode'} eq 'groupimport') { |
my $acts=$ENV{'form.acts'}; |
my $acts=$ENV{'form.acts'}; |
Line 391 $r->print(&Apache::loncommon::bodytag('B
|
Line 397 $r->print(&Apache::loncommon::bodytag('B
|
} |
} |
} |
} |
# ------------------------------- output state of file attributes to be showing |
# ------------------------------- output state of file attributes to be showing |
|
# All versions has to the last item |
|
# since it does not take an extra col |
$r->print(<<END); |
$r->print(<<END); |
<form method="post" name="fileattr" action="$uri" |
<form method="post" name="fileattr" action="$uri" |
enctype="application/x-www-form-urlencoded"> |
enctype="application/x-www-form-urlencoded"> |
Line 410 $r->print(&Apache::loncommon::bodytag('B
|
Line 418 $r->print(&Apache::loncommon::bodytag('B
|
</tr></table> |
</tr></table> |
<input type="hidden" name="dirPointer" value="on" /> |
<input type="hidden" name="dirPointer" value="on" /> |
<input type="hidden" name="acts" value="" /> |
<input type="hidden" name="acts" value="" /> |
<input type="submit" name="attrs" value="Review" /> |
<input type="submit" name="attrs" value="Update Display" /> |
<input type="submit" name="attrs" value="Refresh" /> |
|
$closebutton |
$closebutton |
$groupimportbutton |
$groupimportbutton |
</form> |
</form> |
Line 544 sub scanDir {
|
Line 551 sub scanDir {
|
my $fext = pop @fileparts; |
my $fext = pop @fileparts; |
my $ov = pop @fileparts; |
my $ov = pop @fileparts; |
my $fname = join ('.',@fileparts,$fext); |
my $fname = join ('.',@fileparts,$fext); |
next if (grep /\Q$fname\E/,@list and $ov =~ /\d+/); |
next if (grep /\Q$fname\E/,@list and $ov =~ /^\d+$/); |
} |
} |
} |
} |
|
|
if ($dom eq 'domain') { |
if ($dom eq 'domain') { |
$compuri = join('',$strip,'/'); # dom list has /res/<domain name> |
# dom list has full path /res/<domain name>/ already |
$curdir = $compuri; |
$curdir=''; |
|
$compuri = (split(/\&/,$line))[0]; |
} else { |
} else { |
# user, dir & file have name only, i.e., w/o path |
# user, dir & file have name only, i.e., w/o path |
$compuri = join('',$startdir,$strip,'/'); |
$compuri = join('',$startdir,$strip,'/'); |
Line 578 sub get_list {
|
Line 586 sub get_list {
|
my @list; |
my @list; |
(my $luri = $uri) =~ s/\//_/g; |
(my $luri = $uri) =~ s/\//_/g; |
|
|
if ($ENV{'form.attrs'} eq 'Refresh') { |
if ($ENV{'form.attrs'} eq 'Update Display') { |
foreach (keys %hash) { |
foreach (keys %hash) { |
delete $hash{$_} if ($_ =~ /^dirlist_files_/); |
delete $hash{$_} if ($_ =~ /^dirlist_files_/); |
} |
} |
Line 700 sub display_line {
|
Line 708 sub display_line {
|
if ($ENV{'form.dirPointer'} eq "on"); |
if ($ENV{'form.dirPointer'} eq "on"); |
$r->print("<tr valign='$valign' bgcolor=$fileclr>$extrafield"); |
$r->print("<tr valign='$valign' bgcolor=$fileclr>$extrafield"); |
$r->print("<td>"); |
$r->print("<td>"); |
&begin_form ($r,$filecom[0].'/'); |
&begin_form ($r,$filecom[0]); |
my $anchor = $filecom[0].'/'; |
my $anchor = $filecom[0]; |
$anchor =~ s/\///g; |
$anchor =~ s/\///g; |
$r->print ('<a name="'.$anchor.'">'); |
$r->print ('<a name="'.$anchor.'">'); |
$r->print ('<input type="hidden" name="acts" value="">'); |
$r->print ('<input type="hidden" name="acts" value="">'); |
Line 710 sub display_line {
|
Line 718 sub display_line {
|
$r->print (' name="'.$msg.'" height="22" type="image" border="0">'. |
$r->print (' name="'.$msg.'" height="22" type="image" border="0">'. |
"\n"); |
"\n"); |
$r->print ('<a href="javascript:gothere(\''.$filecom[0]. |
$r->print ('<a href="javascript:gothere(\''.$filecom[0]. |
'/\')"><img src="'.$iconpath.'server.gif"'); |
'\')"><img src="'.$iconpath.'server.gif"'); |
$r->print (' border="0" /></a>'."\n"); |
$r->print (' border="0" /></a>'."\n"); |
$r->print ("Domain - $listname "); |
$r->print ("Domain - $listname "); |
if ($Apache::lonnet::domaindescription{$listname}) { |
if ($Apache::lonnet::domaindescription{$listname}) { |
Line 828 sub display_line {
|
Line 836 sub display_line {
|
" TARGET=_self>$listname</a> "); |
" TARGET=_self>$listname</a> "); |
|
|
$r->print (" (<a href=\"javascript:openWindow('".$filelink. |
$r->print (" (<a href=\"javascript:openWindow('".$filelink. |
".meta', 'metadatafile', '400', '450', 'no', 'yes','no')\"; ". |
".meta', 'metadatafile', '500', '550', 'no', 'yes','no')\"; ". |
"TARGET=_self>metadata</a>) ") if ($metafile == 1); |
"TARGET=_self>metadata</a>) ") if ($metafile == 1); |
|
|
$r->print("</td>\n"); |
$r->print("</td>\n"); |
Line 886 sub display_line {
|
Line 894 sub display_line {
|
} |
} |
if ($hash{'display_attrs_8'} == 1) { |
if ($hash{'display_attrs_8'} == 1) { |
my (%stat) = &Apache::lonmeta::dynamicmeta($filelink) if ($metafile == 1); |
my (%stat) = &Apache::lonmeta::dynamicmeta($filelink) if ($metafile == 1); |
my $stat = ($stat{'course'} eq '' ? '' : $stat{'course'}). |
my $stat = (exists($stat{'course'}) ? $stat{'course'} : ''). |
(($stat{'course'} ne '' || $stat{'count'} ne '') ? '/' : ''). |
((exists($stat{'course'}) || exists($stat{'count'})) ? '/' : ''). |
($stat{'count'} eq '' ? '' : $stat{'count'}); |
(exists($stat{'count'}) ? $stat{'count'} : ''); |
$r->print('<td align=center> '.($stat eq '' ? ' ' : $stat). |
$r->print('<td align=center> '.($stat eq '' ? ' ' : $stat). |
' </td>'."\n"); |
' </td>'."\n"); |
} |
} |