version 1.192, 2009/03/17 23:11:20
|
version 1.194, 2009/03/19 14:24:50
|
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<=14; $i++) { |
for (my $i=0; $i<=15; $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<=14; $i++) { |
for (my $i=0; $i<=15; $i++) { |
$attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1; |
$attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1; |
} |
} |
} |
} |
Line 448 ENDHEADER
|
Line 448 ENDHEADER
|
'nt' => 'Notes', |
'nt' => 'Notes', |
'ab' => 'Abstract', |
'ab' => 'Abstract', |
'ln' => 'Language', |
'ln' => 'Language', |
|
'gl' => 'Grade Level', |
'sa' => 'Source Available', |
'sa' => 'Source Available', |
'sr' => 'Show resource', |
'sr' => 'Show resource', |
'li' => 'Linked/Related Resources', |
'li' => 'Linked/Related Resources', |
Line 484 ENDHEADER
|
Line 485 ENDHEADER
|
<td><label><input type="checkbox" name="attr11" value="1" $attrchk[11] onClick="this.form.submit();" /> $lt{'li'}</label></td> |
<td><label><input type="checkbox" name="attr11" value="1" $attrchk[11] onClick="this.form.submit();" /> $lt{'li'}</label></td> |
<td><label><input type="checkbox" name="attr7" value="1" $attrchk[7] onClick="this.form.submit();" /> $lt{'sr'}</label></td> |
<td><label><input type="checkbox" name="attr7" value="1" $attrchk[7] onClick="this.form.submit();" /> $lt{'sr'}</label></td> |
<td><label><input type="checkbox" name="attr12" value="1" $attrchk[12] onClick="this.form.submit();" /> $lt{'sb'}</label></td> |
<td><label><input type="checkbox" name="attr12" value="1" $attrchk[12] onClick="this.form.submit();" /> $lt{'sb'}</label></td> |
|
<td><label><input type="checkbox" name="attr15" value="1" $attrchk[15] onClick="this.form.submit();" /> $lt{'gl'}</label></td> |
<td> </td> |
<td> </td> |
</tr> |
</tr> |
</table> |
</table> |
Line 581 END
|
Line 583 END
|
if ($hash{'display_attrs_13'} == 1); |
if ($hash{'display_attrs_13'} == 1); |
$r->print("<th>".&mt("Abstract")."</th>\n") |
$r->print("<th>".&mt("Abstract")."</th>\n") |
if ($hash{'display_attrs_14'} == 1); |
if ($hash{'display_attrs_14'} == 1); |
|
$r->print("<th>".&mt("Grade Level")."</th>\n") |
|
if ($hash{'display_attrs_15'} == 1); |
|
|
$r->print(&Apache::loncommon::end_data_table_header_row()); |
$r->print(&Apache::loncommon::end_data_table_header_row()); |
|
|
Line 850 sub display_line {
|
Line 854 sub display_line {
|
|
|
my $tabtag='</td>'; |
my $tabtag='</td>'; |
my $i=0; |
my $i=0; |
while ($i<=14) { |
while ($i<=15) { |
$tabtag=join('',$tabtag,"<td> </td>") |
$tabtag=join('',$tabtag,"<td> </td>") |
if ($i != 9 && |
if ($i != 9 && |
$hash{'display_attrs_'.$i} == 1); |
$hash{'display_attrs_'.$i} == 1); |
Line 1149 $r->print ('<input type="hidden" name="a
|
Line 1153 $r->print ('<input type="hidden" name="a
|
" </td>\n"); |
" </td>\n"); |
} |
} |
|
|
|
if ($hash{'display_attrs_15'} == 1) { |
|
my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel'); |
|
$r->print('<td> '.($gradelevel eq '' ? ' ' : $gradelevel). |
|
" </td>\n"); |
|
} |
|
|
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
|
|
Line 1252 $r->print ('<input type="hidden" name="a
|
Line 1262 $r->print ('<input type="hidden" name="a
|
" </td>\n"); |
" </td>\n"); |
} |
} |
|
|
|
if ($hash{'display_attrs_15'} == 1) { |
|
my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel'); |
|
$r->print('<td> '.($gradelevel eq '' ? ' ' : $gradelevel). |
|
" </td>\n"); |
|
} |
|
|
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
|
|