@@ -, +, @@ status in XSLT OPAC search results --- C4/XSLT.pm | 10 ++++++++- .../en/xslt/MARC21slim2OPACResults.xsl | 22 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -285,9 +285,11 @@ sub buildKohaItemsNamespace { my $location = ""; my $ccode = ""; 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 = ''; my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber}); my $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} ); @@ -300,6 +302,11 @@ sub buildKohaItemsNamespace { if ( $item->{itemnotforloan} && $item->{itemnotforloan} > 0 || $item->{notforloan} && $item->{notforloan} > 0 || $item->{itype} && $itemtypes->{ $item->{itype} }->{notforloan} && $itemtypes->{ $item->{itype} }->{notforloan} == 1 ) { $status = "reference"; } + if ($item->{itemnotforloan} > 0 || $item->{notforloan} > 0 ){ + $status = "reallynotforloan"; + $substatus = $descs{$item->{notforloan}} || ''; + $substatus = $substatus->{opac_description} if $substatus; + } if ($item->{onloan}) { $status = "Checked out"; } @@ -334,6 +341,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 @@ + @@ -1268,6 +1269,27 @@ + + : + + + + + +
+ + + + [Call number: ] + ( + + ) + . , + +
+
+
+ Checked out ( --