From 8bdbb5be5e0d4268b0b1dc69e1bf4581bd64dad1 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 29 Oct 2025 01:24:00 +0000 Subject: [PATCH] Bug 32419: Add XSLT for intranet lists which shows item availability This patch adds a new XSLT to apply to the lists view on the staff interface, used by the XSLTListsDisplay system preference. It is almost a copy of MARC21slim2intranetResults.xsl, used by the XSLTResultsDisplay system preference, except it includes code to also display item availability. Item availability is already shown on the lists view on the OPAC, so this adds that functionality to the staff interface. To test: 1. Create or use a biblio record with multiple items, for example biblionumber 235. 2. Check out an item attached to the record to a patron, i.e. check out barcode 39999000010190 to your logged in user 3. Go to the Detail view for this record. 4. Edit another item attached to the record and give it a not for loan status, i.e. edit barcode 39999000010213 and set it to Not for loan 5. Click the Add to list button above the record. Add the record to an existing list, or create a new one and Save. 6. Go to the Lists module in the staff interface and view the contents of the list you just added your record to. 7. Confirm you see accurate Availability information in the list results, showing available items, unavailable items, and items available for reference. 8. Do a catalogue search that will return your record in the results. Confirm the Availability information does not show in the main results portion underneath the title, it should only show in the rightmost column as normal. Sponsored-by: Pymble Ladies' College --- C4/XSLT.pm | 4 +- .../prog/en/xslt/MARC21slim2intranetLists.xsl | 1263 +++++++++++++++++ .../prog/en/xslt/MARC21slimUtils.xsl | 38 + virtualshelves/shelves.pl | 1 + 4 files changed, 1303 insertions(+), 3 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetLists.xsl diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 68108c500d2..caa8d70dba7 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -158,11 +158,9 @@ sub get_xsl_filename { $theme = C4::Context->preference("opacthemes"); $xslfile = C4::Context->preference('marcflavour') . "slim2OPACResults.xsl"; } elsif ( $xslsyspref eq 'XSLTListsDisplay' ) { - - # Lists default to *Results.xslt $htdocs = C4::Context->config('intrahtdocs'); $theme = C4::Context->preference("template"); - $xslfile = C4::Context->preference('marcflavour') . "slim2intranetResults.xsl"; + $xslfile = C4::Context->preference('marcflavour') . "slim2intranetLists.xsl"; } elsif ( $xslsyspref eq 'OPACXSLTListsDisplay' ) { # Lists default to *Results.xslt diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetLists.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetLists.xsl new file mode 100644 index 00000000000..d4dc75f5f69 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetLists.xsl @@ -0,0 +1,1263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ST + + + BK + CR + + + BK + MX + CF + MP + VM + MU + PR + + + + + + + + + + + + + + + reformatted digital + + + digitized microfilm + + + digitized other analog + + + + + + + + + + + + + + + braille + + + print + + + electronic + + + microfiche + + + microfilm + + + large print + + + + + + + + chip cartridge + + + magnetic disc + + + magneto-optical disc + + + available online + + + tape cartridge + + + tape cassette + + + tape reel + + + + kit + + + + atlas + + + diagram + + + map + + + model + + + profile + + + remote-sensing image + + + section + + + view + + + + aperture card + + + microfiche + + + microfiche cassette + + + microfilm cartridge + + + microfilm cassette + + + microfilm reel + + + microopaque + + + film cartridge + + + film cassette + + + film reel + + + collage + + + photomechanical print + + + photonegative + + + photoprint + + + print + + + technical drawing + + + filmslip + + + filmstrip cartridge + + + filmstrip roll + + + other filmstrip type + + + transparency + + + remote-sensing image + + + cylinder + + + roll + + + sound cartridge + + + sound cassette + + + sound-tape reel + + + sound-track film + + + wire recording + + + combination + + + braille + + + moon + + + tactile, with no writing system + + + braille + + + regular print + + + text in looseleaf binder + + + videocartridge + + + videocassette + + + videoreel + + + + + + + + 245 + abhfgknps + + + + + + + + + + + + + + title + + + + + a + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100,110,111,700,710,711 + abc + + + + + +

by + + + + + + + /cgi-bin/koha/catalogue/search.pl?q=an: + + + &sort_by= + + _ + + + + + + + /cgi-bin/koha/catalogue/search.pl?q=au:" + + " + + &sort_by= + + _ + + + + + + + + + + + + aeq + ab + abcjq + + + + + + :,;/ + + + + + + + + . + + + + + cdnt + + + + + + + + + + + . + + + + + + cdgnt + + + + + + + + + , + + + + d + + + + + + + + + . + + + + t + + + + + + + + + + [ + + + + + + + + , + + + + + + , + + + + + + + + + , + + + + + + , + + + + ] + + + + . | + + +

+
+
+ + + + + + Material type: + + book Set + + + book Text + serial Continuing resource + Article + + + Text + Kit + Mixed materials + Computer file + Map + Film + Picture + Object + Score + Sound + Music + + + + + + + ; Format: + + + + + + + + + ; Type of continuing resource: + + + + loose-leaf + + + series + + + newspaper + + + periodical + + + + + + + + ; Nature of contents: + + + abstract or summary + + + bibliography + + + catalog + + + dictionary + + + encyclopedia + + + handbook + + + legal article + + + index + + + discography + + + legislation + + + theses + + + survey of literature + + + review + + + programmed text + + + filmography + + + directory + + + statistics + + + legal case and case notes + + + law report or digest + + + treaty + + + + + conference publication + + + + + + + + + ; Type of computer file: + + + + numeric data + + + + + + + + ; Nature of contents: + + + patent + + + festschrift + + + + ; Literary form: + + + + Not fiction + + + Fiction + + + Dramas + + + Essays + + + Novels + + + Humor, satires, etc. + + + Letters + + + Short stories + + + Mixed forms + + + Poetry + + + Speeches + + + + + + + ; Literary form: + + biography + + + conference publication + + + drama + + + essay + + + fiction + + + folktale + + + history + + + humor, satire + + + memoir + + + poetry + + + rehearsal + + + reporting + + + sound + + + speech + + + + + + ; Type of visual material: + + + art original + + + kit + + + art reproduction + + + diorama + + + filmstrip + + + game + + + picture + + + graphic + + + technical drawing + + + motion picture + + + chart + + + flash card + + + microscope slide + + + model + + + realia + + + slide + + + transparency + + + videorecording + + + toy + + + + + + + + + ; Audience: + + + Preschool; + + + Primary; + + + Pre-adolescent; + + + Adolescent; + + + Adult; + + + General; + + + Juvenile; + + + Specialized; + + + + + + + + + + + + + + 260 + abcg + results_summary publisher + Publication details: + + + + + /cgi-bin/koha/catalogue/search.pl + + + + + + + + + + + Publication details: + + + + a + + + + + + b + + + + + + + cg + + + + ; + + + + + + + + + Publisher number: + + + abq + | + + + + + + + + + Dissertation note: + + + abcdgo + + + + + + + + Description: + + + + + abcefg + + + + .; + + + + + + + + + Edition: + + + ab + + + + + + + + + 246 + ab + results_summary other_title + Other title: + + + + + + Other title: + + + ab + + + . | + + + + + +
+ + + Checked out + Withdrawn + Lost + Damaged + Pending hold + In transit + On hold + Waiting recall + Not for loan + + + Availability: + + + + + + + + + + + + + + () + + No items available. + + + + + + + + + + Items available for loan: + + + + + + + + + + + + + + + + + + + + Items available for reference: + + + + + + + + + + + + + + + + + + + + + + + + + + + + Not available: + + + + + + + + + + + + + + + : + + + + + + + + + + + + +
+ + + + + + + + + + Online resources: + + + + + + + + + + + + + + 100 + + + + y3z + + + + + + + + + Click here to access online + + + + + + + + | + + + + + + + + + + + + + + + + Suppressed in OPAC + + + +
+ + + + + + abcq + + + + :,;/ + + + + + + + + abcdn + + + + :,;/ + + + + + + + acdeq + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index b30efc0e069..9c16fffc02b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -815,6 +815,44 @@ + + + + + + + + + + + + + ( + + ) + + + Collection, location, call number: + + + + + + + , + + + , .. + + + + + + . + + + +