Browse Source

Bug 7611: (follow-up) Fix display of undefined statuses and add a class

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Nick Clemens 5 years ago
committed by Martin Renvoize
parent
commit
2513b4f596
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 3
      C4/XSLT.pm
  2. 6
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl

3
C4/XSLT.pm

@ -344,8 +344,7 @@ sub buildKohaItemsNamespace {
}
elsif ( $item->notforloan ) {
$status = "reallynotforloan";
$substatus = $descs{$item->{notforloan}} || '';
$substatus = $substatus->{opac_description} if $substatus;
$substatus = exists $descs{$item->{notforloan}} ? $descs{$item->{notforloan}}->{opac_description} : "Not for loan_$item->{notforloan}";
}
elsif ( exists $itemtypes->{ $item->effective_itemtype }
&& $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 )

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

@ -1343,7 +1343,11 @@
<br />
<xsl:variable name="reference_items" select="key('item-by-status', 'reallynotforloan')"/>
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]">
<span class="ItemSummary">
<span>
<xsl:attribute name="class">
ItemSummary
<xsl:value-of select="translate(items:substatus,' ','_')"/>
</xsl:attribute>
<xsl:if test="$singleBranchMode=0">
<span class="ItemBranch"><xsl:value-of select="items:homebranch"/><xsl:text> </xsl:text></span>
</xsl:if>

Loading…
Cancel
Save