version 1.185, 2009/02/02 19:38:12
|
version 1.193, 2009/03/18 13:47:14
|
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<=16; $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<=16; $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', |
|
'gl' => 'Grade Level', |
|
'ab' => 'Abstract', |
|
'sd' => 'Standards', |
'ln' => 'Language', |
'ln' => 'Language', |
'sa' => 'Source Available', |
'sa' => 'Source Available', |
'sr' => 'Show resource', |
'sr' => 'Show resource', |
Line 468 ENDHEADER
|
Line 472 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> |
|
<td><label><input type="checkbox" name="attr16" value="1" $attrchk[16] onClick="this.form.submit();" /> $lt{'sd'}</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> |
|
<td> </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> |
<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 573 END
|
Line 582 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("<th>".&mt("Grade Level")."</th>\n") |
|
if ($hash{'display_attrs_15'} == 1); |
|
$r->print("<th>".&mt("Standards")."</th>\n") |
|
if ($hash{'display_attrs_16'} == 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 858 sub display_line {
|
|
|
my $tabtag='</td>'; |
my $tabtag='</td>'; |
my $i=0; |
my $i=0; |
while ($i<=12) { |
while ($i<=16) { |
$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); |
$i++; |
$i++; |
} |
} |
my $valign = ($hash{'display_attrs_7'} == 1 ? 'top' : 'bottom'); |
my $valign = ($hash{'display_attrs_7'} == 1 ? 'top' : 'bottom'); |
|
|
Line 999 sub display_line {
|
Line 1016 sub display_line {
|
$indent--; |
$indent--; |
} |
} |
# General indentation |
# General indentation |
if ($indent > 0 and $indent < 12) { |
if ($indent > 0 and $indent < 16) { |
$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 1147 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 = ' ' if (!$keywords); |
|
$r->print('<td> '.($subject eq '' ? ' ' : $subject). |
$r->print('<td> '.($subject eq '' ? ' ' : $subject). |
" </td>\n"); |
" </td>\n"); |
} |
} |
|
|
|
if ($hash{'display_attrs_13'} == 1) { |
|
my $notes = &Apache::lonnet::metadata($filelink,'notes'); |
|
$r->print('<td> '.($notes eq '' ? ' ' : $notes). |
|
" </td>\n"); |
|
} |
|
|
|
if ($hash{'display_attrs_14'} == 1) { |
|
my $abstract = &Apache::lonnet::metadata($filelink,'abstract'); |
|
$r->print('<td> '.($abstract eq '' ? ' ' : $abstract). |
|
" </td>\n"); |
|
} |
|
|
|
if ($hash{'display_attrs_15'} == 1) { |
|
my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel'); |
|
$r->print('<td> '.($gradelevel eq '' ? ' ' : $gradelevel). |
|
" </td>\n"); |
|
} |
|
|
|
if ($hash{'display_attrs_16'} == 1) { |
|
my $standards = &Apache::lonnet::metadata($filelink,'standards'); |
|
$r->print('<td> '.($standards eq '' ? ' ' : $standards). |
|
" </td>\n"); |
|
} |
|
|
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
|
|
Line 1228 sub display_line {
|
Line 1268 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 = ' ' if (!$keywords); |
|
$r->print('<td> '.($subject eq '' ? ' ' : $subject). |
$r->print('<td> '.($subject eq '' ? ' ' : $subject). |
" </td>\n"); |
" </td>\n"); |
} |
} |
|
if ($hash{'display_attrs_13'} == 1) { |
|
my $notes = &Apache::lonnet::metadata($filelink,'notes'); |
|
$r->print('<td> '.($notes eq '' ? ' ' : $notes). |
|
" </td>\n"); |
|
} |
|
|
|
if ($hash{'display_attrs_14'} == 1) { |
|
my $abstract = &Apache::lonnet::metadata($filelink,'abstract'); |
|
$r->print('<td> '.($abstract eq '' ? ' ' : $abstract). |
|
" </td>\n"); |
|
} |
|
|
|
if ($hash{'display_attrs_15'} == 1) { |
|
my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel'); |
|
$r->print('<td> '.($gradelevel eq '' ? ' ' : $gradelevel). |
|
" </td>\n"); |
|
} |
|
|
|
if ($hash{'display_attrs_16'} == 1) { |
|
my $standards = &Apache::lonnet::metadata($filelink,'standards'); |
|
$r->print('<td> '.($standards eq '' ? ' ' : $standards). |
|
" </td>\n"); |
|
} |
|
|
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |