From eee5289de515d9027741b84b5184319dd7fb55e0 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 7 Apr 2008 20:02:18 -0400 Subject: [PATCH] adding additional statuses display for XSL Signed-off-by: Joshua Ferraro --- C4/XSLT.pm | 18 ++++++++-- .../prog/en/xslt/MARC21slim2OPACResults.xsl | 33 ++++++++++++++++--- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 1057685198..d6cdcfaef1 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -128,8 +128,22 @@ sub buildKohaItemsNamespace { my $xml; for my $item (@items) { my $status; - if ($item->{onloan}) { - $status = "On loan"; + if ( $item->{notforloan} == -1 || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged}) { + if ( $item->{notforloan} == -1) { + $status = "On order"; + } + if ($item->{onloan}) { + $status = "On loan"; + } + if ( $item->{wthdrawn}) { + $status = "Withdrawn"; + } + if ($item->{itemlost}) { + $status = "Lost"; + } + if ($item->{damaged}) { + $status = "Damaged"; + } } else { $status = "available"; } diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl index 96965af717..e3eb06a10a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl @@ -422,9 +422,9 @@ - + + . ; - .; @@ -808,7 +808,8 @@ ( - ) + ) +. , @@ -816,9 +817,33 @@ On loan ( - ) + ) + + + Withdrawn ( + + ) + + + + Lost ( + + ) + + + + Damaged ( + + ) + + + + On order ( + + ) + -- 2.39.5