$ctx->{copies} = $copy_rec->gather(1);
- my $course_module_opt_in = 0;
+ $ctx->{course_module_opt_in} = 0;
if ($ctx->{get_org_setting}->($org, "circ.course_materials_opt_in")) {
- $course_module_opt_in = 1;
+ $ctx->{course_module_opt_in} = 1;
}
# Add public copy notes to each copy - and while we're in there, grab peer bib records
'open-ils.circ.copy_note.retrieve.all',
{itemid => $copy->{id}, pub => 1 }
);
- if ($course_module_opt_in) {
+ if ($ctx->{course_module_opt_in}) {
$copy->{course_materials} = $U->simplereq(
'open-ils.circ',
'open-ils.circ.course_materials.retrieve',
[%- END %]
<th scope='col'>[% l("Barcode") %]</th>
<th scope='col'>[% l("Shelving Location") %]</th>
- [%- IF ctx.is_staff %]
+ [% IF ctx.is_staff || ctx.get_org_setting(ctx.aou_tree.id, 'circ.course_materials_opt_in') == 1 %]
<th scope='col'>[% l("Circulation Modifier") %]</th>
+ [% END %]
+ [% IF ctx.is_staff %]
<th scope='col'>[% l("Age Hold Protection") %]</th>
<th scope='col'>[% l("Active/Create Date") %]</th>
[%- END %]
END; -%]
</td>
<td property="availableAtOrFrom">[%- INCLUDE "opac/parts/location_name_link.tt2"; -%]</td>
- [%- IF ctx.is_staff %]
+
+ [% IF copy_info.courses.size > 0 || ctx.is_staff %]
<td>[% copy_info.circ_modifier | html %]</td>
+ [% ELSIF ctx.is_staff %]
<td>
[% copy_info.age_protect ?
ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
'-';
END;
%]</td>
+ [% ELSIF ctx.get_org_setting(ctx.aou_tree.id, 'circ.course_materials_opt_in') == 1 %]
+ <td></td>
[% END # is_staff %]
[% IF ctx.is_staff OR serial_holdings %]
<td>[% # Show copy/volume hold links to staff (without