--- loncom/interface/lonindexer.pm 2003/09/23 00:26:10 1.76 +++ loncom/interface/lonindexer.pm 2003/09/26 00:23:09 1.77 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.76 2003/09/23 00:26:10 www Exp $ +# $Id: lonindexer.pm,v 1.77 2003/09/26 00:23:09 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -64,6 +64,7 @@ use Apache::loncommon(); use Apache::Constants qw(:common); use Apache::lonmeta; use Apache::File; +use Apache::lonlocal; use GDBM_File; # ---------------------------------------- variables used throughout the module @@ -149,8 +150,9 @@ sub handler { ''; $colspan=" colspan='2' "; + my $cl=&mt('Close'); $closebutton=< + END } elsif ($ENV{'form.catalogmode'} eq 'groupimport') { @@ -158,11 +160,13 @@ END ''; $colspan=" colspan='2' "; + my $cl=&mt('Close'); + my $gi=&mt('Group Import'); $closebutton=< + END $groupimportbutton=< END } @@ -399,26 +403,40 @@ $r->print(&Apache::loncommon::bodytag('B # ------------------------------- output state of file attributes to be showing # All versions has to the last item # since it does not take an extra col + my %lt=&Apache::lonlocal::texthash( + 'ti' => 'Title', + 'si' => 'Size', + 'la' => 'Last access', + 'lm' => 'Last modified', + 'st' => 'Statistics', + 'au' => 'Author', + 'kw' => 'Keywords', + 'la' => 'Language', + 'sr' => 'Show resource', + 'av' => 'All versions', + 'ud' => 'Update Display' + ); $r->print(< Display file attributes
- - - - - - - - - - + + + + + + + + + + +
Title Size Last access Last modified Statistics
Author Keywords Language Show Resource All versions $lt{'ti'} $lt{'si'} $lt{'la'} $lt{'lm'} $lt{'st'}
$lt{'au'} $lt{'kw'} $lt{'la'} $lt{'sr'} $lt{'av'}  
- + $closebutton $groupimportbutton @@ -431,24 +449,25 @@ END # $r->print(&writedebug("Only:@Only")) if (@Only); $r->print("
\n"); $r->print("\n"); - $r->print("\n"); - $r->print("\n") + $r->print("\n"); + $r->print("\n") if ($hash{'display_attrs_0'} == 1); - $r->print("\n") if ($hash{'display_attrs_1'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_2'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_3'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_4'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_5'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_6'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_7'} == 1); - $r->print("\n") + $r->print("\n") if ($hash{'display_attrs_8'} == 1); $r->print(''); @@ -586,7 +605,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_/); } @@ -665,8 +684,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; @@ -695,7 +714,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? @@ -720,7 +739,7 @@ sub display_line { $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}. ")"); @@ -758,6 +777,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) {
NameTitle".&mt('Name')."".&mt('Title')."Size (bytes) ". + $r->print("".&mt("Size")." (".&mt("bytes").") ". "Last accessed".&mt("Last accessed")."Last modified".&mt("Last modified")."Author(s)".&mt("Author(s)")."Keywords".&mt("Keywords")."Language".&mt("Language")."Resource".&mt("Resource")."Usage Statistics
(Courses/Network Hits)
".&mt("Usage Statistics")."
(". + &mt("Courses/Network Hits").")