Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
}
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 )
<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>