\n");
$r->print("\n");
- $r->print("Name | \n");
- $r->print("Title | \n")
+ $r->print("".&mt('Name')." | \n");
+ $r->print("".&mt('Title')." | \n")
if ($hash{'display_attrs_0'} == 1);
- $r->print("Size (bytes) ".
+ $r->print(" | ".&mt("Size")." (".&mt("bytes").") ".
" | \n") if ($hash{'display_attrs_1'} == 1);
- $r->print("Last accessed | \n")
+ $r->print("".&mt("Last accessed")." | \n")
if ($hash{'display_attrs_2'} == 1);
- $r->print("Last modified | \n")
+ $r->print("".&mt("Last modified")." | \n")
if ($hash{'display_attrs_3'} == 1);
- $r->print("Author(s) | \n")
+ $r->print("".&mt("Author(s)")." | \n")
if ($hash{'display_attrs_4'} == 1);
- $r->print("Keywords | \n")
+ $r->print("".&mt("Keywords")." | \n")
if ($hash{'display_attrs_5'} == 1);
- $r->print("Language | \n")
+ $r->print("".&mt("Language")." | \n")
if ($hash{'display_attrs_6'} == 1);
- $r->print("Resource | \n")
+ $r->print("".&mt("Resource")." | \n")
if ($hash{'display_attrs_7'} == 1);
- $r->print("Usage Statistics (Courses/Network Hits) | \n")
+ $r->print("".&mt("Usage Statistics")." (".
+ &mt("Courses/Network Hits").") | \n")
if ($hash{'display_attrs_8'} == 1);
$r->print(' ');
@@ -549,13 +602,14 @@ sub scanDir {
my $fext = pop @fileparts;
my $ov = pop @fileparts;
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') {
# dom list has full path /res// already
$curdir='';
+ $compuri = (split(/\&/,$line))[0];
} else {
# user, dir & file have name only, i.e., w/o path
$compuri = join('',$startdir,$strip,'/');
@@ -583,7 +637,7 @@ sub get_list {
my @list;
(my $luri = $uri) =~ s/\//_/g;
- if ($ENV{'form.attrs'} eq 'Update Display') {
+ if ($ENV{'form.attrs'} eq &mt('Update Display')) {
foreach (keys %hash) {
delete $hash{$_} if ($_ =~ /^dirlist_files_/);
}
@@ -646,7 +700,7 @@ sub match_ext {
push @trimlist,$line;
}
}
- @trimlist = sort (@trimlist);
+ @trimlist = sort {uc($a) cmp uc($b)} (@trimlist);
return @trimlist;
}
@@ -662,8 +716,8 @@ sub display_line {
my @pathcom = split (/\//,$filecom[0]);
my $listname = $pathcom[scalar(@pathcom)-1];
my $fnptr = $filecom[3]&$dirptr;
- my $msg = 'View '.$filecom[0].' resources';
- $msg = 'Close '.$filecom[0].' directory' if $diropen eq 'opened';
+ my $msg = &mt('View').' '.$filecom[0].' '.&mt('resources');
+ $msg = &mt('Close').' '.$filecom[0].' '.&mt('directory') if $diropen eq 'opened';
my $tabtag='';
my $i=0;
@@ -692,7 +746,7 @@ sub display_line {
$r->print ('print (' name="'.$msg.'" height="22" type="image" border="0">'.
"\n");
- $r->print("Up $tabtag\n");
+ $r->print(&mt("Up")." $tabtag\n");
return OK;
}
# Do we have permission to look at this?
@@ -705,8 +759,8 @@ sub display_line {
if ($ENV{'form.dirPointer'} eq "on");
$r->print("$extrafield");
$r->print("");
- &begin_form ($r,$filecom[0].'/');
- my $anchor = $filecom[0].'/';
+ &begin_form ($r,$filecom[0]);
+ my $anchor = $filecom[0];
$anchor =~ s/\///g;
$r->print ('');
$r->print ('');
@@ -715,9 +769,9 @@ sub display_line {
$r->print (' name="'.$msg.'" height="22" type="image" border="0">'.
"\n");
$r->print (' print (' border="0" />'."\n");
- $r->print ("Domain - $listname ");
+ $r->print (&mt("Domain")." - $listname ");
if ($Apache::lonnet::domaindescription{$listname}) {
$r->print("(".$Apache::lonnet::domaindescription{$listname}.
")");
@@ -755,6 +809,7 @@ sub display_line {
# display file
if ($fnptr == 0 and $filecom[3] ne '') {
my $filelink = $startdir.$filecom[0];
+ next if &Apache::lonnet::metadata($filelink,'obsolete');
my @file_ext = split (/\./,$listname);
my $curfext = $file_ext[-1];
if (@Omit) {
|
|