Bug 21340: Add spans with classes around callnumbers in OPAC for additional styling
authorKyle M Hall <kyle@bywatersolutiosn.com>
Wed, 12 Sep 2018 16:38:42 +0000 (09:38 -0700)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 1 Oct 2018 13:56:29 +0000 (13:56 +0000)
It would be nice if the callnumber portion of the callnumber + label was in a span, and it also makes sense to wrap the entire callnumber string in a span as well.

Signed-off-by: Petter <petter@libriotech.no>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl

index fd98cb1..e98d3de 100644 (file)
                    <xsl:when test="$singleBranchMode=1">
                        <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
                            <span class="ItemSummary">
-                               <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                               <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
+                                   <span class="CallNumberAndLabel">
+                                       [<span class="LabelCallNumber">Call number: </span><span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>]
+                                   </span>
+                               </xsl:if>
                                <xsl:text> (</xsl:text>
                                    <xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/>
                                <xsl:text>)</xsl:text>
                                <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
                                    <span class="ItemSummary">
                                        <xsl:value-of select="items:homebranch"/>
-                                       <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                                       <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
+                                           <span class="CallNumberAndLabel">
+                                               [<span class="LabelCallNumber">Call number: </span><span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>]
+                                           </span>
+                                       </xsl:if>
                                        <xsl:text> (</xsl:text>
                                            <xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/>
                                        <xsl:text>)</xsl:text>
                                <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]">
                                    <span class="ItemSummary">
                                        <xsl:value-of select="items:holdingbranch"/>
-                                       <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                                       <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
+                                           <span class="CallNumberAndLabel">
+                                               [<span class="LabelCallNumber">Call number: </span><span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>]
+                                           </span>
+                                       </xsl:if>
                                        <xsl:text> (</xsl:text>
                                            <xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/>
                                        <xsl:text>)</xsl:text>
                                 <xsl:if test="$singleBranchMode=0">
                                     <xsl:value-of select="items:homebranch"/>
                                 </xsl:if>
-                                <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                                <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
+                                    <span class="CallNumberAndLabel">
+                                        [<span class="LabelCallNumber">Call number: </span><span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>]
+                                    </span>
+                                </xsl:if>
                                 <xsl:text> (</xsl:text>
                                 <xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/>
                                 <xsl:text>)</xsl:text>