Bug 32689: Add missing space between 773$i label text and content
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 20 Jan 2023 15:49:09 +0000 (15:49 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 31 Jan 2023 13:49:34 +0000 (10:49 -0300)
When 777 Ind. 2 = 8, $i will be used as the label. In this case,
we were missing a space between the $i and the other subfields.
This patch makes sure there is a space.

Note: the colon is expected to be part of the data here.

To test:
* Update default framework to display 773 a t w i by default in the editor,
  OPAC and staff interface.
* Search for a record in the staff interface
* Click New > Add child record from the detail page
* Enter 245 and any mandatory fields
* Add $i to 773 entry and make the indicators: 0 8
* On the detail page and the result lists,
  $i will be used a label, but there'll be no space between
  label and content.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl

index 33ae687..d9a49ff 100644 (file)
                         <xsl:when test="@ind2=' '">
                             In:
                         </xsl:when>
-                        <xsl:when test="@ind2=8">
-                            <xsl:if test="marc:subfield[@code='i']">
-                                <xsl:value-of select="marc:subfield[@code='i']"/>
-                            </xsl:if>
+                        <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
+                            <xsl:call-template name="subfieldSelect">
+                                <xsl:with-param name="codes">i</xsl:with-param>
+                            </xsl:call-template>
+                            <xsl:text> </xsl:text>
                         </xsl:when>
                     </xsl:choose>
                     </span>
index 64b49ed..e899b81 100644 (file)
                         <xsl:when test="@ind2=' '">
                             In:
                         </xsl:when>
-                        <xsl:when test="@ind2=8">
-                            <xsl:if test="marc:subfield[@code='i']">
-                                <xsl:value-of select="marc:subfield[@code='i']"/>
-                            </xsl:if>
+                        <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
+                            <xsl:call-template name="subfieldSelect">
+                                <xsl:with-param name="codes">i</xsl:with-param>
+                            </xsl:call-template>
+                            <xsl:text> </xsl:text>
                         </xsl:when>
                     </xsl:choose>
                     </span>