Diff for /loncom/interface/lonindexer.pm between versions 1.185 and 1.186

version 1.185, 2009/02/02 19:38:12 version 1.186, 2009/02/03 15:58:11
Line 420  ENDHEADER Line 420  ENDHEADER
   
 # ---------------------------------- get state of file attributes to be showing  # ---------------------------------- get state of file attributes to be showing
  if ($env{'form.attrs'}) {   if ($env{'form.attrs'}) {
     for (my $i=0; $i<=12; $i++) {      for (my $i=0; $i<=14; $i++) {
  delete $hash{'display_attrs_'.$i};   delete $hash{'display_attrs_'.$i};
  if ($env{'form.attr'.$i} == 1) {   if ($env{'form.attr'.$i} == 1) {
     $attrchk[$i] = 'checked';      $attrchk[$i] = 'checked';
Line 428  ENDHEADER Line 428  ENDHEADER
  }   }
     }      }
  } else {   } else {
     for (my $i=0; $i<=12; $i++) {      for (my $i=0; $i<=14; $i++) {
  $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;   $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;
     }      }
  }   }
Line 445  ENDHEADER Line 445  ENDHEADER
    'au' => 'Author',     'au' => 'Author',
    'kw' => 'Keywords',     'kw' => 'Keywords',
    'sb' => 'Subject',     'sb' => 'Subject',
      'nt' => 'Notes ',
      'ab' => 'Abstract ',
    'ln' => 'Language',     'ln' => 'Language',
    'sa' => 'Source Available',     'sa' => 'Source Available',
    'sr' => 'Show resource',     'sr' => 'Show resource',
Line 468  ENDHEADER Line 470  ENDHEADER
 <td><label><input type="checkbox" name="attr4" value="1" $attrchk[4] onClick="this.form.submit();" /> $lt{'au'}</label></td>  <td><label><input type="checkbox" name="attr4" value="1" $attrchk[4] onClick="this.form.submit();" /> $lt{'au'}</label></td>
 <td><label><input type="checkbox" name="attr5" value="1" $attrchk[5] onClick="this.form.submit();" /> $lt{'kw'}</label></td>  <td><label><input type="checkbox" name="attr5" value="1" $attrchk[5] onClick="this.form.submit();" /> $lt{'kw'}</label></td>
 <td><label><input type="checkbox" name="attr6" value="1" $attrchk[6] onClick="this.form.submit();" /> $lt{'ln'}</label></td>  <td><label><input type="checkbox" name="attr6" value="1" $attrchk[6] onClick="this.form.submit();" /> $lt{'ln'}</label></td>
   <td><label><input type="checkbox" name="attr13" value="1" $attrchk[13] onClick="this.form.submit();" /> $lt{'nt'}</label></td>
 </tr>  </tr>
 <tr>  <tr>
 <td><label><input type="checkbox" name="attr1" value="1" $attrchk[1] onClick="this.form.submit();" /> $lt{'si'}</label></td>  <td><label><input type="checkbox" name="attr1" value="1" $attrchk[1] onClick="this.form.submit();" /> $lt{'si'}</label></td>
 <td><label><input type="checkbox" name="attr2" value="1" $attrchk[2] onClick="this.form.submit();" /> $lt{'la'}</label></td>  <td><label><input type="checkbox" name="attr2" value="1" $attrchk[2] onClick="this.form.submit();" /> $lt{'la'}</label></td>
 <td><label><input type="checkbox" name="attr3" value="1" $attrchk[3] onClick="this.form.submit();" /> $lt{'lm'}</label></td>  <td><label><input type="checkbox" name="attr3" value="1" $attrchk[3] onClick="this.form.submit();" /> $lt{'lm'}</label></td>
 <td><label><input type="checkbox" name="attr10" value="1" $attrchk[10] onClick="this.form.submit();" /> $lt{'sa'}</label></td>  <td><label><input type="checkbox" name="attr10" value="1" $attrchk[10] onClick="this.form.submit();" /> $lt{'sa'}</label></td>
   <td><label><input type="checkbox" name="attr14" value="1" $attrchk[14] onClick="this.form.submit();" /> $lt{'ab'}</label></td>
 </tr>  </tr>
 <tr>  <tr>
 <td><label><input type="checkbox" name="attr8" value="1" $attrchk[8] onClick="this.form.submit();" /> $lt{'st'}</label></td>  <td><label><input type="checkbox" name="attr8" value="1" $attrchk[8] onClick="this.form.submit();" /> $lt{'st'}</label></td>
Line 573  END Line 577  END
     if ($hash{'display_attrs_7'} == 1);      if ($hash{'display_attrs_7'} == 1);
  $r->print("<th>".&mt("Subject")."</th>\n")   $r->print("<th>".&mt("Subject")."</th>\n")
     if ($hash{'display_attrs_12'} == 1);      if ($hash{'display_attrs_12'} == 1);
    $r->print("<th>".&mt("Notes")."</th>\n")
       if ($hash{'display_attrs_13'} == 1);
    $r->print("<th>".&mt("Abstract")."</th>\n")
       if ($hash{'display_attrs_14'} == 1);
           
     $r->print(&Apache::loncommon::end_data_table_header_row());      $r->print(&Apache::loncommon::end_data_table_header_row());
           
Line 841  sub display_line { Line 849  sub display_line {
   
     my $tabtag='</td>';      my $tabtag='</td>';
     my $i=0;      my $i=0;
     while ($i<=12) {      while ($i<=14) {
  $tabtag=join('',$tabtag,"<td>&nbsp;</td>")   $tabtag=join('',$tabtag,"<td>&nbsp;</td>")
     if ($i != 9 &&      if ($i != 9 &&
  $hash{'display_attrs_'.$i} == 1);   $hash{'display_attrs_'.$i} == 1);
Line 999  sub display_line { Line 1007  sub display_line {
     $indent--;      $indent--;
  }   }
 # General indentation  # General indentation
  if ($indent > 0 and $indent < 12) {   if ($indent > 0 and $indent < 14) {
     $r->print("<img alt=\"\" src='",$iconpath,"whitespace",$indent,      $r->print("<img alt=\"\" src='",$iconpath,"whitespace",$indent,
       ".gif' class='LC_icon' />\n");        ".gif' class='LC_icon' />\n");
  } elsif ($indent >0) {   } elsif ($indent >0) {
Line 1130  sub display_line { Line 1138  sub display_line {
           
     if ($hash{'display_attrs_12'} == 1) {      if ($hash{'display_attrs_12'} == 1) {
     my $subject = &Apache::lonnet::metadata($filelink,'subject');      my $subject = &Apache::lonnet::metadata($filelink,'subject');
     # $keywords = '&nbsp;' if (!$keywords);  
     $r->print('<td> '.($subject eq '' ? '&nbsp;' : $subject).      $r->print('<td> '.($subject eq '' ? '&nbsp;' : $subject).
       " </td>\n");        " </td>\n");
  }   }
   
    if ($hash{'display_attrs_13'} == 1) {
       my $notes = &Apache::lonnet::metadata($filelink,'notes');
       $r->print('<td> '.($notes eq '' ? '&nbsp;' : $notes).
         " </td>\n");
    }
   
    if ($hash{'display_attrs_14'} == 1) {
       my $abstract = &Apache::lonnet::metadata($filelink,'abstract');
       $r->print('<td> '.($abstract eq '' ? '&nbsp;' : $abstract).
         " </td>\n");
    }
   
  $r->print(&Apache::loncommon::end_data_table_row());   $r->print(&Apache::loncommon::end_data_table_row());
 }  }
           
Line 1228  sub display_line { Line 1247  sub display_line {
  }   }
  if ($hash{'display_attrs_12'} == 1) {   if ($hash{'display_attrs_12'} == 1) {
     my $subject = &Apache::lonnet::metadata($filelink,'subject');      my $subject = &Apache::lonnet::metadata($filelink,'subject');
     # $keywords = '&nbsp;' if (!$keywords);  
     $r->print('<td> '.($subject eq '' ? '&nbsp;' : $subject).      $r->print('<td> '.($subject eq '' ? '&nbsp;' : $subject).
       " </td>\n");        " </td>\n");
  }   }
    if ($hash{'display_attrs_13'} == 1) {
       my $notes = &Apache::lonnet::metadata($filelink,'notes');
       $r->print('<td> '.($notes eq '' ? '&nbsp;' : $notes).
         " </td>\n");
    }
   
    if ($hash{'display_attrs_14'} == 1) {
       my $abstract = &Apache::lonnet::metadata($filelink,'abstract');
       $r->print('<td> '.($abstract eq '' ? '&nbsp;' : $abstract).
         " </td>\n");
    }
   
  $r->print(&Apache::loncommon::end_data_table_row());   $r->print(&Apache::loncommon::end_data_table_row());
     }      }

Removed from v.1.185  
changed lines
  Added in v.1.186


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>