LP#1642000 - Add Call number prefix, suffix and part to opac circ history
authorJosh Stompro <stompro@stompro.org>
Tue, 27 Jul 2021 14:26:02 +0000 (09:26 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 21 Sep 2021 16:52:21 +0000 (12:52 -0400)
Signed-off-by: Josh Stompro <stompro@stompro.org>
Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/myopac/circ_history.tt2

index fa62334..084aecc 100644 (file)
@@ -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']
         },
     );
 
index 1faffe6..afef26a 100644 (file)
                         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 = "";
                             [% END; %]
                         </td>
                         <td>[% circ.circ.target_copy.barcode | html %]</td>
-                        <td>[% circ.circ.target_copy.call_number.label | html %]</td>
+                        <td>
+                            [%-
+                                 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 %]
+                                  </BR>[% circ.circ.target_copy.parts.0.label | html -%]
+                            [%- END %]
+                         </td>
                     </tr>
                 [% END %]
             </tbody>