From 6c986199119358774a444cc8c36e43ef483d1a7b Mon Sep 17 00:00:00 2001 From: Remington Steed Date: Wed, 24 Apr 2019 09:37:22 -0400 Subject: [PATCH] LP#1741980: Fetch and show copy tag label in OPAC 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 Signed-off-by: Garry Collum Signed-off-by: Kyle Huckins Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm | 6 +++++- Open-ILS/src/templates/opac/parts/record/copy_table.tt2 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm index 0dfebd3bf6..3c40e2dabc 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm @@ -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'] } + }]); } diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index 1c7a2de0dd..14c2d70ca2 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -240,7 +240,7 @@ END; # FOREACH bib [% IF tag.url %] [% END %] - [% tag.value | html %] + [% tag.tag_type.label _ ": " _ tag.value | html %] [% IF tag.url %] [% END %] -- 2.11.0