From e9fe5e5585ee774e01e51509c41dd9252d1be955 Mon Sep 17 00:00:00 2001
From: William Lavoie <william.lavoie@inLibro.com>
Date: Wed, 9 Apr 2025 15:46:56 -0400
Subject: [PATCH] Bug 39596: Adding a label when the second indicator of MARC
 780/785 is void
Content-Type: text/plain; charset=utf-8

Test plan:

1. Go to Administration > MARC Bibliographic framework
2. On the right side of the default framework, click on "Actions" >
   "MARC Structure"
3. Search for field 780
4. Click on "Actions" > "Edit subfields"
5. Click on the "t" tab
6. Check "Editor" under the "Visibility" section
7. Click on "Save Changes"
8. Repeat steps 1 to 7 for field 785$t
9. Have or create a record with a value for 780 and 785 with the first
   indicator at 0 and the other left empty
10. Go see the record on the OPAC
11. Notice that in Normal View, the value entered for 780 and 785 do not
    have labels
12. Apply the patch
13. There are now labels

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
---
 .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
index b5b07f3ee8..83795d69a7 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
@@ -1580,6 +1580,9 @@
                             <xsl:when test="@ind2=7">
                                 <span class="label">Separated from:</span>
                             </xsl:when>
+                            <xsl:otherwise>
+                                <span class="label">Preceding entry:</span>
+                            </xsl:otherwise>
                         </xsl:choose>
                         <xsl:text> </xsl:text>
 
@@ -1668,6 +1671,9 @@
                             <xsl:when test="@ind2=8">
                                 <span class="label">Changed back to:</span>
                             </xsl:when>
+                            <xsl:otherwise>
+                               <span class="label">Succeeding entry:</span>
+                            </xsl:otherwise>
                         </xsl:choose>
                         <xsl:text> </xsl:text>
 
-- 
2.39.5