From: Josh Stompro Date: Tue, 27 Jul 2021 14:26:02 +0000 (-0500) Subject: LP#1642000 - Add Call number prefix, suffix and part to opac circ history X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=82518f5d6b43cbbe035ab5011d667270399f3d6c;p=evergreen%2Fpines.git LP#1642000 - Add Call number prefix, suffix and part to opac circ history 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 fa623340b7..084aecccd5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -2198,8 +2198,8 @@ sub fetch_user_circ_history { flesh => 3, flesh_fields => { auch => ['target_copy','source_circ'], - acp => ['call_number'], - acn => ['record'] + acp => ['call_number','parts'], + acn => ['record','prefix','suffix'] }, ); diff --git a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2 index 1faffe6e24..afef26a445 100644 --- a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2 @@ -136,7 +136,17 @@ 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; sort_field = ""; @@ -202,7 +212,23 @@ [% END; %] [% 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 %] + [% END %]