@@ -, +, @@ in XSLT OPAC search results --- C4/XSLT.pm | 10 ++++++++++ .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -310,8 +310,12 @@ sub buildKohaItemsNamespace { my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } }; my $xml = ''; + my %descs = map { $_->{authorised_value} => $_ } Koha::AuthorisedValues->get_descriptions_by_koha_field( { kohafield => 'items.notforloan' } ); + for my $item (@items) { my $status; + my $substatus = ''; +<<<<<<< HEAD if ($item->has_pending_hold) { $status = 'Pending hold'; @@ -334,6 +338,11 @@ sub buildKohaItemsNamespace { elsif ($item->onloan) { $status = "Checked out"; } + elsif ( $item->notforloan > 0 ) { + $status = "reallynotforloan"; + $substatus = $descs{$item->{notforloan}} || ''; + $substatus = $substatus->{opac_description} if $substatus; + } elsif ( $item->notforloan && $item->notforloan > 0 || exists $itemtypes->{ $item->effective_itemtype } && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) @@ -359,6 +368,7 @@ sub buildKohaItemsNamespace { . "$location" . "$ccode" . "".( $status // q{} )."" + . "$substatus" . "$itemcallnumber" . "$stocknumber" . ""; --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -12,6 +12,7 @@ + @@ -1332,6 +1333,27 @@ + + : + + + + + +
+ + + + [Call number: ] + ( + + ) + . , + +
+
+
+ Checked out ( --