From: Josh Stompro Date: Fri, 16 Jul 2021 20:01:53 +0000 (-0500) Subject: LP#1642000 - Add CN Prefix, Suffix and Parts to opac checked out item display X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=67035bc685f3a42f9f5128bea659bba5559ea789;p=working%2FEvergreen.git LP#1642000 - Add CN Prefix, Suffix and Parts to opac checked out item display Add Call Number Prefix, Call Number Suffix and Part to the call number column of checked out items display. Also sort based on the label_sortkey value of those fields. Testing Notes: Check out an asortment of copies to your patron account. Pick a mix of items with Call number prefix and suffix, and some with parts. View the list of checked out items in the myopac interface. Notices that no call number suffix or prefix are showing, and no parts info is showing. Apply the patch and see that the extra info is showing. Also try sorting on call number column. Signed-off-by: Josh Stompro Signed-off-by: Elaine Hardy Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 3449a7cf46..fa623340b7 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -2050,8 +2050,8 @@ sub fetch_user_circs { flesh => 3, flesh_fields => { circ => ['target_copy'], - acp => ['call_number'], - acn => ['record','owning_lib'] + acp => ['call_number','parts'], + acn => ['record','owning_lib','prefix','suffix'] } }; diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2 index 1c068befc7..1d3695ad49 100644 --- a/Open-ILS/src/templates/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circs.tt2 @@ -117,7 +117,18 @@ circ.SORTING = circ.circ.target_copy.barcode; CASE "callnum"; - circ.SORTING = circ.circ.target_copy.call_number.label; + sortlist = []; + + FOREACH element IN [circ.circ.target_copy.call_number.prefix.label_sortkey + circ.circ.target_copy.call_number.label_sortkey + circ.circ.target_copy.call_number.suffix.label_sortkey + circ.circ.target_copy.parts.0.label_sortkey]; + IF (element); + sortlist.push(element); + END; + END; + circ.SORTING = sortlist.join(""); + CASE "lib"; circ.SORTING = circ.circ.target_copy.call_number.owning_lib.name; @@ -185,7 +196,21 @@ [% circ.circ.target_copy.barcode | html %] - [% circ.circ.target_copy.call_number.label | html %] + [%- + cnlist = []; + FOREACH element IN [circ.circ.target_copy.call_number.prefix.label + circ.circ.target_copy.call_number.label + circ.circ.target_copy.call_number.suffix.label]; + IF (element); + cnlist.push(element); + END; + END; + cn = cnlist.join(' '); + %] + [% cn | html %] + [%- IF circ.circ.target_copy.parts.0.label %] +
[% circ.circ.target_copy.parts.0.label | html -%] + [%- END %] [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]