LP#1741980: Give type label its own span and class for easy hiding
authorRemington Steed <rjs7@calvin.edu>
Tue, 28 May 2019 13:33:44 +0000 (09:33 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 6 Sep 2019 16:45:49 +0000 (12:45 -0400)
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
docs/RELEASE_NOTES_NEXT/OPAC/copy_tag_display_includes_type.adoc [new file with mode: 0644]

index 14c2d70..9d126f6 100644 (file)
@@ -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 (file)
index 0000000..d26d3b2
--- /dev/null
@@ -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.
+