This adds patron and item statistical categories to the Bootstrap OPAC.
OPAC-visible patron stat cats will appear in My Account > Preferences >
Personal Information as new rows below the Account Expiration Date.
OPAC-visible item stat cats will appear below Copy Notes in the copy table
on the record details page.
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
{
flesh => 2,
flesh_fields => {
- au => [qw/card home_ou addresses ident_type locale billing_address waiver_entries/, @extra_flesh],
- "aou" => ["billing_address"]
+ au => [qw/card home_ou addresses ident_type locale billing_address waiver_entries stat_cat_entries/, @extra_flesh],
+ "aou" => ["billing_address"],
+ "actscecm" => ["stat_cat"]
}
}
]);
# Add public copy notes to each copy - and while we're in there, grab peer bib records
# and copy tags. Oh and if we're working with course materials, those too.
+ # And opac-visible item stat cats.
my %cached_bibs = ();
foreach my $copy (@{$ctx->{copies}}) {
$copy->{notes} = $U->simplereq(
'open-ils.circ.copy_note.retrieve.all',
{itemid => $copy->{id}, pub => 1 }
);
+ $copy->{statcats} = $U->simplereq(
+ 'open-ils.circ',
+ 'open-ils.circ.asset.stat_cat_entries.fleshed.retrieve_by_copy',
+ {copyid => $copy->{id}, public => 1}
+ );
if ($ctx->{course_module_opt_in}) {
$copy->{course_materials} = $U->simplereq(
'open-ils.courses',
</td>
<td></td>
</tr>
-
-
-
+ [% IF ctx.user.stat_cat_entries.size;
+ FOR statcat IN ctx.user.stat_cat_entries;
+ IF statcat.stat_cat.opac_visible == 't'; %]
+ <tr>
+ <td class='color_4 light_border'>[% statcat.stat_cat.name %]</td>
+ <td class='light_border' colspan='2'>[% statcat.stat_cat_entry %]</td>
+ </tr>
+ [% END;
+ END;
+ END %]
</tbody>
</table>
</div>
[% END %]
[% END %]
+ [% IF copy_info.statcats.size; %]
+ [% FOREACH statcat IN copy_info.statcats;
+ IF statcat.stat_cat.opac_visible == 't'; %]
+ <br/>[% statcat.stat_cat.name %]: [% statcat.value %]
+ [% END;
+ END %]
+ [% END %]
</td>
[%- IF has_parts == 'true' %]
<td>[% copy_info.part_label | html %]</td>