Bugzilla – Attachment 123527 Details for
Bug 26302
OPAC XSLT Results: List variable number of itemcallnumbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26302: Add resultbranch and other status in C4/XSLT
Bug-26302-Add-resultbranch-and-other-status-in-C4X.patch (text/plain), 3.41 KB, created by
Owen Leonard
on 2021-08-05 18:52:03 UTC
(
hide
)
Description:
Bug 26302: Add resultbranch and other status in C4/XSLT
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-08-05 18:52:03 UTC
Size:
3.41 KB
patch
obsolete
>From d2257f7e7601764a7893ac968492e734cd644881 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 5 Aug 2021 11:43:16 +0000 >Subject: [PATCH] Bug 26302: Add resultbranch and other status in C4/XSLT > >Groundwork for changes in the OPAC results xslt. > >NOTE: Adds both new prefs too. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/XSLT.pm | 24 +++++++++++++++++------- > 1 file changed, 17 insertions(+), 7 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 245d76b74f..7584356a06 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -172,6 +172,7 @@ sub get_xslt_sysprefs { > TrackClicks opacthemes IdRef OpacSuppression > OPACResultsLibrary OPACShowOpenURL > OpenURLResolverURL OpenURLImageLocation >+ resultsMaxItems resultsMaxItemsUnavailable > OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / ) > { > my $sp = C4::Context->preference( $syspref ); >@@ -334,25 +335,32 @@ sub buildKohaItemsNamespace { > my $substatus = ''; > > if ($item->has_pending_hold) { >- $status = 'Pending hold'; >+ $status = 'other'; >+ $substatus = 'Pending hold'; > } > elsif ( $item->holds->waiting->count ) { >- $status = 'Waiting'; >+ $status = 'other'; >+ $substatus = 'Waiting'; > } > elsif ($item->get_transfer) { >- $status = 'In transit'; >+ $status = 'other'; >+ $substatus = 'In transit'; > } > elsif ($item->damaged) { >- $status = "Damaged"; >+ $status = 'other'; >+ $substatus = "Damaged"; > } > elsif ($item->itemlost) { >- $status = "Lost"; >+ $status = 'other'; >+ $substatus = "Lost"; > } > elsif ( $item->withdrawn) { >- $status = "Withdrawn"; >+ $status = 'other'; >+ $substatus = "Withdrawn"; > } > elsif ($item->onloan) { >- $status = "Checked out"; >+ $status = 'other'; >+ $substatus = "Checked out"; > } > elsif ( $item->notforloan ) { > $status = $item->notforloan =~ /^($ref_status)$/ >@@ -374,6 +382,7 @@ sub buildKohaItemsNamespace { > } > my $homebranch = xml_escape($branches{$item->homebranch}); > my $holdingbranch = xml_escape($branches{$item->holdingbranch}); >+ my $resultbranch = C4::Context->preference('OPACResultsLibrary') eq 'homebranch' ? $homebranch : $holdingbranch; > my $location = xml_escape($item->location && exists $shelflocations->{$item->location} ? $shelflocations->{$item->location} : $item->location); > my $ccode = xml_escape($item->ccode && exists $ccodes->{$item->ccode} ? $ccodes->{$item->ccode} : $item->ccode); > my $itemcallnumber = xml_escape($item->itemcallnumber); >@@ -382,6 +391,7 @@ sub buildKohaItemsNamespace { > "<item>" > . "<homebranch>$homebranch</homebranch>" > . "<holdingbranch>$holdingbranch</holdingbranch>" >+ . "<resultbranch>$resultbranch</resultbranch>" > . "<location>$location</location>" > . "<ccode>$ccode</ccode>" > . "<status>".( $status // q{} )."</status>" >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26302
:
109184
|
119108
|
119109
|
119110
|
119111
|
122386
|
122387
|
122388
|
122389
|
122391
|
122462
|
122463
|
122464
|
122465
|
122466
|
122487
|
123499
|
123500
|
123501
|
123502
|
123526
|
123527
|
123528
|
123529
|
123531
|
123532
|
123533
|
123534
|
123640
|
123641
|
123643
|
123644
|
123645
|
123646
|
123647
|
123648
|
123649
|
124243
|
124244
|
124245