LP#1741980: Fetch and show copy tag label in OPAC
authorRemington Steed <rjs7@calvin.edu>
Wed, 24 Apr 2019 13:37:22 +0000 (09:37 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 6 Sep 2019 16:45:39 +0000 (12:45 -0400)
When copy/item tags (such as "Digital Bookplate") are displayed in the
OPAC, they currently only show the tag's value, but not the label of the
tags type. This commit fleshes in the tag type so we gain access to the
type's label, and it adds it to the OPAC display.

OPAC output before: "(Tag Value Here)"

OPAC output after: "Digital Bookplate: (Tag Value Here)"

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index 0dfebd3..3c40e2d 100644 (file)
@@ -1109,7 +1109,11 @@ sub fetch_copy_tags {
         }
     };
 
-    return $e->search_asset_copy_tag([$filter, { join => { acptcm => {} } }]);
+    return $e->search_asset_copy_tag([$filter, {
+        join => { acptcm => {} },
+        flesh => 1,
+        flesh_fields => { acpt => ['tag_type'] }
+    }]);
 }
 
 
index 1c7a2de..14c2d70 100644 (file)
@@ -240,7 +240,7 @@ END; # FOREACH bib
                             [% IF tag.url %]
                             <a href="[% tag.url | html %]">
                             [% END %]
-                                [% tag.value | html %]
+                                [% tag.tag_type.label _ ": " _ tag.value | html %]
                             [% IF tag.url %]
                             </a>
                             [% END %]