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>
This commit is contained in:
parent
128fcb8dd4
commit
2513b4f596
2 changed files with 6 additions and 3 deletions
|
@ -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 )
|
||||
|
|
|
@ -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…
Reference in a new issue