--- loncom/interface/lonindexer.pm 2009/02/02 19:38:12 1.185 +++ loncom/interface/lonindexer.pm 2009/02/03 15:58:11 1.186 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.185 2009/02/02 19:38:12 jms Exp $ +# $Id: lonindexer.pm,v 1.186 2009/02/03 15:58:11 jms Exp $ # # Copyright Michigan State University Board of Trustees # @@ -420,7 +420,7 @@ ENDHEADER # ---------------------------------- get state of file attributes to be showing if ($env{'form.attrs'}) { - for (my $i=0; $i<=12; $i++) { + for (my $i=0; $i<=14; $i++) { delete $hash{'display_attrs_'.$i}; if ($env{'form.attr'.$i} == 1) { $attrchk[$i] = 'checked'; @@ -428,7 +428,7 @@ ENDHEADER } } } else { - for (my $i=0; $i<=12; $i++) { + for (my $i=0; $i<=14; $i++) { $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1; } } @@ -445,6 +445,8 @@ ENDHEADER 'au' => 'Author', 'kw' => 'Keywords', 'sb' => 'Subject', + 'nt' => 'Notes ', + 'ab' => 'Abstract ', 'ln' => 'Language', 'sa' => 'Source Available', 'sr' => 'Show resource', @@ -468,12 +470,14 @@ ENDHEADER + + @@ -573,6 +577,10 @@ END if ($hash{'display_attrs_7'} == 1); $r->print("".&mt("Subject")."\n") if ($hash{'display_attrs_12'} == 1); + $r->print("".&mt("Notes")."\n") + if ($hash{'display_attrs_13'} == 1); + $r->print("".&mt("Abstract")."\n") + if ($hash{'display_attrs_14'} == 1); $r->print(&Apache::loncommon::end_data_table_header_row()); @@ -841,7 +849,7 @@ sub display_line { my $tabtag=''; my $i=0; - while ($i<=12) { + while ($i<=14) { $tabtag=join('',$tabtag," ") if ($i != 9 && $hash{'display_attrs_'.$i} == 1); @@ -999,7 +1007,7 @@ sub display_line { $indent--; } # General indentation - if ($indent > 0 and $indent < 12) { + if ($indent > 0 and $indent < 14) { $r->print("\"\"\n"); } elsif ($indent >0) { @@ -1130,11 +1138,22 @@ sub display_line { if ($hash{'display_attrs_12'} == 1) { my $subject = &Apache::lonnet::metadata($filelink,'subject'); - # $keywords = ' ' if (!$keywords); $r->print(' '.($subject eq '' ? ' ' : $subject). " \n"); } + if ($hash{'display_attrs_13'} == 1) { + my $notes = &Apache::lonnet::metadata($filelink,'notes'); + $r->print(' '.($notes eq '' ? ' ' : $notes). + " \n"); + } + + if ($hash{'display_attrs_14'} == 1) { + my $abstract = &Apache::lonnet::metadata($filelink,'abstract'); + $r->print(' '.($abstract eq '' ? ' ' : $abstract). + " \n"); + } + $r->print(&Apache::loncommon::end_data_table_row()); } @@ -1228,10 +1247,20 @@ sub display_line { } if ($hash{'display_attrs_12'} == 1) { my $subject = &Apache::lonnet::metadata($filelink,'subject'); - # $keywords = ' ' if (!$keywords); $r->print(' '.($subject eq '' ? ' ' : $subject). " \n"); } + if ($hash{'display_attrs_13'} == 1) { + my $notes = &Apache::lonnet::metadata($filelink,'notes'); + $r->print(' '.($notes eq '' ? ' ' : $notes). + " \n"); + } + + if ($hash{'display_attrs_14'} == 1) { + my $abstract = &Apache::lonnet::metadata($filelink,'abstract'); + $r->print(' '.($abstract eq '' ? ' ' : $abstract). + " \n"); + } $r->print(&Apache::loncommon::end_data_table_row()); }