--- loncom/interface/lonindexer.pm 2004/06/17 20:43:04 1.114 +++ loncom/interface/lonindexer.pm 2004/06/18 01:09:24 1.115 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.114 2004/06/17 20:43:04 www Exp $ +# $Id: lonindexer.pm,v 1.115 2004/06/18 01:09:24 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -440,26 +440,30 @@ $r->print(&Apache::loncommon::bodytag('B 'av' => 'All versions', 'ud' => 'Update Display' ); - my $Displayfileattributes=&mt('Display file attributes'); $r->print(< -$Displayfileattributes
- + $lt{'av'} +
+ + + + + + - - - - - - - + + + -
$lt{'ti'} $lt{'au'} $lt{'kw'} $lt{'ln'}
$lt{'si'} $lt{'la'} $lt{'lm'} $lt{'st'} $lt{'sa'}
$lt{'au'} $lt{'kw'} $lt{'ln'} $lt{'sr'} $lt{'av'}
$lt{'st'} $lt{'li'}
+ $lt{'sr'} +  + + @@ -512,8 +516,6 @@ END if ($hash{'display_attrs_5'} == 1); $r->print("".&mt("Language")."\n") if ($hash{'display_attrs_6'} == 1); - $r->print("".&mt("Resource")."\n") - if ($hash{'display_attrs_7'} == 1); $r->print("".&mt("Usage Statistics")."
(". &mt("Courses/Network Hits").")
\n") if ($hash{'display_attrs_8'} == 1); @@ -521,6 +523,8 @@ END if ($hash{'display_attrs_10'} == 1); $r->print("".&mt("Linked/Related Resources")."\n") if ($hash{'display_attrs_11'} == 1); + $r->print("".&mt("Resource")."\n") + if ($hash{'display_attrs_7'} == 1); $r->print(''); # ----------------- read in what directories have previously been set to "open" @@ -986,34 +990,6 @@ sub display_line { $r->print(' '.($lang eq '' ? ' ' : $lang). " \n"); } - if ($hash{'display_attrs_7'} == 1) { - my $output=''; - my $embstyle=&Apache::loncommon::fileembstyle($curfext); - if ($embstyle eq 'ssi') { - my $cache=$Apache::lonnet::perlvar{'lonDocRoot'}.$filelink. - '.tmp'; - if ((!$ENV{'form.updatedisplay'}) && - (-e $cache)) { - open(FH,$cache); - $output=join("\n",); - close(FH); - } else { - $output=&Apache::lonnet::ssi_body($filelink); - open(FH,">$cache"); - print FH $output; - close(FH); - } - $output=''.$output.''; - } elsif ($embstyle eq 'img') { - $output=''; - } elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) { - $output=''; - } - $r->print(' '.($output eq '' ? ' ':$output). - " \n"); - } if ($hash{'display_attrs_8'} == 1) { # statistics $r->print(""); @@ -1051,6 +1027,35 @@ sub display_line { &dynmetaprint($r,$filelink,'dependencies'); $r->print(''); } + if ($hash{'display_attrs_7'} == 1) { +# Show resource + my $output=''; + my $embstyle=&Apache::loncommon::fileembstyle($curfext); + if ($embstyle eq 'ssi') { + my $cache=$Apache::lonnet::perlvar{'lonDocRoot'}.$filelink. + '.tmp'; + if ((!$ENV{'form.updatedisplay'}) && + (-e $cache)) { + open(FH,$cache); + $output=join("\n",); + close(FH); + } else { + $output=&Apache::lonnet::ssi_body($filelink); + open(FH,">$cache"); + print FH $output; + close(FH); + } + $output=''.$output.''; + } elsif ($embstyle eq 'img') { + $output=''; + } elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) { + $output=''; + } + $r->print(' '.($output eq '' ? ' ':$output). + " \n"); + } $r->print("\n"); } @@ -1121,18 +1126,18 @@ sub display_line { $r->print(' '.($lang eq '' ? ' ' : $lang). " \n"); } - if ($hash{'display_attrs_7'} == 1) { - $r->print(' '); - } if ($hash{'display_attrs_8'} == 1) { $r->print(' '); } - if ($hash{'display_attrs_10'} == 1) { + if ($hash{'display_attrs_10'} == 1) { $r->print(' '); } if ($hash{'display_attrs_11'} == 1) { $r->print(' '); } + if ($hash{'display_attrs_7'} == 1) { + $r->print(' '); + } $r->print(''); }