--- loncom/interface/lonindexer.pm 2003/03/14 16:12:14 1.62 +++ loncom/interface/lonindexer.pm 2003/03/19 14:50:32 1.63 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.62 2003/03/14 16:12:14 albertel Exp $ +# $Id: lonindexer.pm,v 1.63 2003/03/19 14:50:32 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -390,11 +390,12 @@ $r->print(&Apache::loncommon::bodytag('B Size Last access Last modified - Show Resource + All versions Author Keywords Language - All versions + Show Resource +  @@ -428,7 +429,7 @@ END $r->print("Language\n") if ($hash{'display_attrs_6'} == 1); $r->print("Resource\n") - if ($hash{'display_attrs_8'} == 1); + if ($hash{'display_attrs_7'} == 1); $r->print(''); # ----------------- read in what directories have previously been set to "open" @@ -514,7 +515,7 @@ sub scanDir { my ($strip,$dom,undef,$testdir,undef)=split(/\&/,$line,5); next if $strip =~ /.*\.meta$/; my (@fileparts) = split(/\./,$strip); - if ($hash{'display_attrs_7'} != 1) { + if ($hash{'display_attrs_8'} != 1) { if (scalar(@fileparts) >= 3) { my $fext = pop @fileparts; my $ov = pop @fileparts; @@ -638,16 +639,18 @@ sub display_line { my $tabtag=''; my $i=0; - while ($i<=6) { + while ($i<=7) { $tabtag=join('',$tabtag," ") if $hash{'display_attrs_'.$i} == 1; $i++; } + + my $valign = ($hash{'display_attrs_7'} == 1 ? 'top' : 'bottom'); # display uplink arrow if ($filecom[1] eq 'viewOneUp') { $r->print("$extrafield"); - $r->print("\n"); + $r->print("\n"); $r->print ('
'."\n") if ($ENV{'form.dirPointer'} eq "on"); $r->print("$extrafield"); - $r->print(""); + $r->print(""); &begin_form ($r,$filecom[0].'/'); my $anchor = $filecom[0].'/'; $anchor =~ s/\///g; @@ -694,7 +697,7 @@ sub display_line { } if ($filecom[1] eq 'user') { $r->print("$extrafield"); - $r->print("\n"); + $r->print("\n"); my $curdir = $startdir.$filecom[0].'/'; my $anchor = $curdir; $anchor =~ s/\///g; @@ -738,7 +741,7 @@ sub display_line { $iconname = $curfext.".gif" unless (!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn'); # - $r->print(""); + $r->print(""); my $metafile = grep /^\Q$filecom[0]\E\.meta\&/, @list; my $title; if ($ENV{'form.catalogmode'} eq 'interactive') { @@ -752,7 +755,7 @@ sub display_line { $titleesc,"','",$filelink,"')\">"); $r->print("". "\n"); - $r->print(""); + $r->print(""); } elsif ($ENV{'form.catalogmode'} eq 'groupimport') { $title=$listname; @@ -771,7 +774,7 @@ sub display_line { $r->print("\n"); $r->print("
\n"); - $r->print(""); + $r->print(""); $hash{"pre_${fnum}_link"}=$filelink; $hash{"pre_${fnum}_title"}=$titleesc; $fnum++; @@ -806,40 +809,40 @@ sub display_line { if ($hash{'display_attrs_0'} == 1) { my $title = &Apache::lonnet::metadata($filelink,'title') if ($metafile == 1); - $r->print(' '.($title eq '' ? ' ' : $title). + $r->print(' '.($title eq '' ? ' ' : $title). ' '."\n"); } - $r->print(' ', + $r->print(' ', $filecom[8]," \n") if $hash{'display_attrs_1'} == 1; - $r->print(' '. + $r->print(' '. (localtime($filecom[9]))." \n") if $hash{'display_attrs_2'} == 1; - $r->print(' '. + $r->print(' '. (localtime($filecom[10]))." \n") if $hash{'display_attrs_3'} == 1; if ($hash{'display_attrs_4'} == 1) { my $author = &Apache::lonnet::metadata($filelink,'author') if ($metafile == 1); - $r->print(' '.($author eq '' ? ' ' : $author). + $r->print(' '.($author eq '' ? ' ' : $author). " \n"); } if ($hash{'display_attrs_5'} == 1) { my $keywords = &Apache::lonnet::metadata($filelink,'keywords') if ($metafile == 1); # $keywords = ' ' if (!$keywords); - $r->print(' '.($keywords eq '' ? ' ' : $keywords). + $r->print(' '.($keywords eq '' ? ' ' : $keywords). " \n"); } if ($hash{'display_attrs_6'} == 1) { my $lang = &Apache::lonnet::metadata($filelink,'language') if ($metafile == 1); $lang = &Apache::loncommon::languagedescription($lang); - $r->print(' '.($lang eq '' ? ' ' : $lang). + $r->print(' '.($lang eq '' ? ' ' : $lang). " \n"); } - if ($hash{'display_attrs_8'} == 1) { + if ($hash{'display_attrs_7'} == 1) { my $output=''; my $embstyle=&Apache::loncommon::fileembstyle($curfext); if ($embstyle eq 'ssi') { @@ -852,7 +855,7 @@ sub display_line { $Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}. '/cgi-bin/thumbnail.gif?url='.$filelink.'" />'; } - $r->print(' '.($output eq '' ? ' ':$output). + $r->print(' '.($output eq '' ? ' ':$output). " \n"); } $r->print("\n"); @@ -865,7 +868,7 @@ sub display_line { my $curdir = $startdir.$filecom[0].'/'; my $anchor = $curdir; $anchor =~ s/\///g; - $r->print("$extrafield"); + $r->print("$extrafield"); &begin_form ($r,$curdir); my $indentm1 = $indent-1; if ($indentm1 < 11 and $indentm1 > 0) {