From 8f88f6892cf4163fdc6c9ad26cd8f83364832ef8 Mon Sep 17 00:00:00 2001
From: Remington Steed <rjs7@calvin.edu>
Date: Tue, 28 May 2019 09:33:44 -0400
Subject: [PATCH] LP#1741980: Give type label its own span and class for easy
 hiding

This commit separates the copy tag type label into its own span with a
new class "copy_tag_type_label", so that libraries can hide it or style
it differently. Release notes are included.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
---
 Open-ILS/src/templates/opac/parts/record/copy_table.tt2      |  3 ++-
 .../OPAC/copy_tag_display_includes_type.adoc                 | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/copy_tag_display_includes_type.adoc

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 14c2d70ca2..9d126f6444 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -236,11 +236,12 @@ END; # FOREACH bib
                 <tr class="copy_tag_row">
                     <td>&nbsp;</td>
                     <td class="copy_tag" colspan="4">
+                        <span class="copy_tag_type_label">[% tag.tag_type.label _ ": " | html %]</span>
                         <span class="copy_tag_value">
                             [% IF tag.url %]
                             <a href="[% tag.url | html %]">
                             [% END %]
-                                [% tag.tag_type.label _ ": " _ tag.value | html %]
+                                [% tag.value | html %]
                             [% IF tag.url %]
                             </a>
                             [% END %]
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/copy_tag_display_includes_type.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/copy_tag_display_includes_type.adoc
new file mode 100644
index 0000000000..d26d3b20de
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/copy_tag_display_includes_type.adoc
@@ -0,0 +1,12 @@
+Item Tags Now Display Tag Type Labels
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+When item tags display in the catalog, they will now include the label from the
+item tag type.  For example, for a tag of type "Digital Bookplate", here is a
+comparison of the old and new display:
+
+ * Old output: "(Tag Value Here)"
+ * New output: "Digital Bookplate: (Tag Value Here)"
+
+The type label is wrapped in a new CSS class `copy_tag_type_label` that allows
+it to be styled separately from the tag value or hidden entirely.
+
-- 
2.11.0