--- loncom/interface/lonindexer.pm 2009/03/17 20:07:45 1.190 +++ loncom/interface/lonindexer.pm 2009/03/19 14:24:50 1.194 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.190 2009/03/17 20:07:45 schulted Exp $ +# $Id: lonindexer.pm,v 1.194 2009/03/19 14:24:50 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<=14; $i++) { + for (my $i=0; $i<=15; $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<=14; $i++) { + for (my $i=0; $i<=15; $i++) { $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1; } } @@ -448,6 +448,7 @@ ENDHEADER 'nt' => 'Notes', 'ab' => 'Abstract', 'ln' => 'Language', + 'gl' => 'Grade Level', 'sa' => 'Source Available', 'sr' => 'Show resource', 'li' => 'Linked/Related Resources', @@ -484,6 +485,7 @@ ENDHEADER +   @@ -527,7 +529,7 @@ END # -------------------------------------------------------- Resource Home Button my $reshome=$env{'course.'.$env{'request.course.id'}.'.reshome'}; if ($reshome) { - $r->print("print('javascript:document.forms.fileattr.action="'.&Apache::loncommon::inhibit_menu_check($reshome).'";document.forms.fileattr.submit();'); } else { @@ -549,7 +551,7 @@ END #$r->print(&writedebug("Omit:@Omit")) if (@Omit); #$r->print(&writedebug("Only:@Only")) if (@Only); $r->print('

'); - $r->print(&Apache::loncommon::start_data_table("LC_tableOfContent") + $r->print(&Apache::loncommon::start_data_table("LC_tableBrowseRes") .&Apache::loncommon::start_data_table_header_row()); $r->print("".&mt('Name')."\n"); $r->print("".&mt('Title')."\n") @@ -581,6 +583,8 @@ END if ($hash{'display_attrs_13'} == 1); $r->print("".&mt("Abstract")."\n") if ($hash{'display_attrs_14'} == 1); + $r->print("".&mt("Grade Level")."\n") + if ($hash{'display_attrs_15'} == 1); $r->print(&Apache::loncommon::end_data_table_header_row()); @@ -850,7 +854,7 @@ sub display_line { my $tabtag=''; my $i=0; - while ($i<=14) { + while ($i<=15) { $tabtag=join('',$tabtag," ") if ($i != 9 && $hash{'display_attrs_'.$i} == 1); @@ -880,7 +884,7 @@ sub display_line { $startdir.'" />'."\n"); $r->print (''."\n"); $r->print ('
print (' name="'.$msg.'" type="image" class="LC_icon" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_fileicon" />'. "\n"); $r->print(&mt("Up")."$tabtag"); $r->print(&Apache::loncommon::end_data_table_row()); @@ -907,15 +911,15 @@ sub display_line { $r->print (''); $r->print (''); $r->print ('print (' name="'.$msg.'" type="image" class="LC_icon" />'. + $r->print (' name="'.$msg.'" type="image" class="LC_fileicon" />'. "\n"); my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]); $r->print ('print (' class="LC_icon" />'."\n"); + $r->print (' class="LC_fileicon" />'."\n"); $r->print (&mt("Domain")." - $listname "); if (&Apache::lonnet::domain($listname,'description')) { - $r->print("(".&Apache::lonnet::domain($listname,'description'). + $r->print("
(".&Apache::lonnet::domain($listname,'description'). ")"); } $r->print("$tabtag"); @@ -938,13 +942,13 @@ $r->print (''); $r->print (''); $r->print ('print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'. + '.gif" class="LC_fileicon"'); + $r->print (' name="'.$msg.'"/>'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); $r->print (''.$msg.''); + $iconpath.'quill.gif" class="LC_fileicon" />'); my $domain=(split(m|/|,$startdir))[2]; my $plainname=&Apache::loncommon::plainname($listname,$domain); $r->print ($listname.''); @@ -1021,13 +1025,15 @@ $r->print (''); - $r->print ('print (' name="'.$msg.'" type="image" class="LC_icon" />'. + $r->print (''); + $r->print (''); + $r->print ('print (' name="'.$msg.'" type="image" class="LC_fileicon" />'. "\n"); } # Filetype icons - $r->print("\"\"\n"); + $r->print("\"\"\n"); my $quotable_filelink = &Apache::loncommon::escape_single($filelink); $r->print (" print (' '.($author eq '' ? ' ' : $author). " \n"); } if ($hash{'display_attrs_5'} == 1) { @@ -1147,6 +1153,12 @@ $r->print ('\n"); } + if ($hash{'display_attrs_15'} == 1) { + my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel'); + $r->print(' '.($gradelevel eq '' ? ' ' : $gradelevel). + " \n"); + } + $r->print(&Apache::loncommon::end_data_table_row()); } @@ -1173,7 +1185,7 @@ $r->print (''); $r->print ('print (' name="'.$msg.'" class="LC_icon" />'. + $r->print (' name="'.$msg.'" class="LC_fileicon" />'. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); @@ -1181,7 +1193,7 @@ $r->print ('print ('' - .''.&mt('Open Folder').''. "\n"); $r->print ("$listname\n"); @@ -1250,6 +1262,12 @@ $r->print ('\n"); } + if ($hash{'display_attrs_15'} == 1) { + my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel'); + $r->print(' '.($gradelevel eq '' ? ' ' : $gradelevel). + " \n"); + } + $r->print(&Apache::loncommon::end_data_table_row()); }