Diff for /loncom/interface/lonindexer.pm between versions 1.55 and 1.56

version 1.55, 2003/01/14 18:47:50 version 1.56, 2003/01/15 23:58:58
Line 373  $r->print(&Apache::loncommon::bodytag('B Line 373  $r->print(&Apache::loncommon::bodytag('B
   
 # ---------------------------------- get state of file attributes to be showing  # ---------------------------------- get state of file attributes to be showing
  if ($ENV{'form.attrs'} ne '') {   if ($ENV{'form.attrs'} ne '') {
     for (my $i=0; $i<=7; $i++) {      for (my $i=0; $i<=8; $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 381  $r->print(&Apache::loncommon::bodytag('B Line 381  $r->print(&Apache::loncommon::bodytag('B
  }   }
     }      }
  } else {   } else {
     for (my $i=0; $i<=7; $i++) {      for (my $i=0; $i<=8; $i++) {
  $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;   $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;
     }      }
  }   }
Line 395  $r->print(&Apache::loncommon::bodytag('B Line 395  $r->print(&Apache::loncommon::bodytag('B
 <td><input type="checkbox" name="attr1" value="1" $attrchk[1] /> Size</td>  <td><input type="checkbox" name="attr1" value="1" $attrchk[1] /> Size</td>
 <td><input type="checkbox" name="attr2" value="1" $attrchk[2] /> Last access</td>  <td><input type="checkbox" name="attr2" value="1" $attrchk[2] /> Last access</td>
 <td><input type="checkbox" name="attr3" value="1" $attrchk[3] /> Last modified</td>  <td><input type="checkbox" name="attr3" value="1" $attrchk[3] /> Last modified</td>
 </tr><tr>  <td rowspan="2"><input type="checkbox" name="attr8" value="1" $attrchk[8] /> Show Resource</td></tr><tr>
 <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> Author</td>  <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> Author</td>
 <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> Keywords</td>  <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> Keywords</td>
 <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> Language</td>  <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> Language</td>
Line 432  END Line 432  END
     if ($hash{'display_attrs_5'} == 1);      if ($hash{'display_attrs_5'} == 1);
  $r->print("<td><b>Language</b></td>\n")   $r->print("<td><b>Language</b></td>\n")
     if ($hash{'display_attrs_6'} == 1);      if ($hash{'display_attrs_6'} == 1);
    $r->print("<td><b>Resource</b></td>\n")
       if ($hash{'display_attrs_8'} == 1);
  $r->print('</tr>');   $r->print('</tr>');
   
 # ----------------- read in what directories have previously been set to "open"  # ----------------- read in what directories have previously been set to "open"
Line 834  sub display_line { Line 836  sub display_line {
     $r->print('<td valign=bottom> '.($lang eq '' ? '&nbsp;' : $lang).      $r->print('<td valign=bottom> '.($lang eq '' ? '&nbsp;' : $lang).
       " </td>\n");        " </td>\n");
  }   }
           if ($hash{'display_attrs_8'} == 1) {
               my $output='';
       if (&Apache::loncommon::fileembstyle($curfext) eq 'ssi') {
          $output=&Apache::lonnet::ssi($filelink);
                  $output=~s/^.*\<body[^\>]*\>//si;
                  $output=~s/\<\/body\s*\>.*$//si;
                  $output='<font size="-2">'.$output.'</font>';
      }
      $r->print('<td valign=bottom> '.($output eq '' ? '&nbsp;':$output).
         " </td>\n");
           }
  $r->print("</tr>\n");   $r->print("</tr>\n");
     }      }
   

Removed from v.1.55  
changed lines
  Added in v.1.56


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