Bugzilla – Attachment 163784 Details for
Bug 36366
Itemtype can be used in XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36366: Itemtype can be used in XSLT
Bug-36366-Itemtype-can-be-used-in-XSLT.patch (text/plain), 1.76 KB, created by
Frédéric Demians
on 2024-03-25 10:18:40 UTC
(
hide
)
Description:
Bug 36366: Itemtype can be used in XSLT
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2024-03-25 10:18:40 UTC
Size:
1.76 KB
patch
obsolete
>From 102eb34575f5c62933a804c5baa44330abfae108 Mon Sep 17 00:00:00 2001 >From: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> >Date: Wed, 20 Mar 2024 18:06:02 +1300 >Subject: [PATCH] Bug 36366: Itemtype can be used in XSLT >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >- Apply patch >- Go to one of the XSLT files e.g. MARC21slim2OPACResults.xsl >- Use $itemtype defined in C4/XSLT.pm e.g. copy how $OPACItemLocation is used in MARC21slim2OPACResults.xsl >- See if the XSLT changes worked e.g. go to search results and see if itemtype is there > >Sponsored-by: Catalyst IT >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >--- > C4/XSLT.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 458d732d23..0057b9def6 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -354,6 +354,12 @@ sub buildKohaItemsNamespace { > else { > $status = "available"; > } >+ >+ my $itemtype; >+ if ( exists $itemtypes->{ $item->effective_itemtype } ) { >+ $itemtype = $item->effective_itemtype; >+ } >+ > my $homebranch = C4::Koha::xml_escape($branches{$item->homebranch}); > my $holdingbranch = C4::Koha::xml_escape($branches{$item->holdingbranch}); > my $resultbranch = C4::Context->preference('OPACResultsLibrary') eq 'homebranch' ? $homebranch : $holdingbranch; >@@ -372,6 +378,7 @@ sub buildKohaItemsNamespace { > . "<substatus>$substatus</substatus>" > . "<itemcallnumber>$itemcallnumber</itemcallnumber>" > . "<stocknumber>$stocknumber</stocknumber>" >+ . "<itemtype>$itemtype</itemtype>" > . "</item>"; > } > $xml = "<items xmlns=\"http://www.koha-community.org/items\">".$xml."</items>"; >-- >2.34.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 36366
:
163488
|
163763
| 163784