From 7c7dc8d9661e16741a8ebadd0b87b64df8340208 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: 0. Restart services and compile CSS for changes to take effect, in KTD this looks like: yarn build && restart_all 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 Signed-off-by: Hayley Cheng --- C4/XSLT.pm | 4 +- .../prog/css/src/staff-global.scss | 8 + .../prog/en/xslt/MARC21slim2intranetLists.xsl | 1263 +++++++++++++++++ .../prog/en/xslt/MARC21slimUtils.xsl | 38 + virtualshelves/shelves.pl | 1 + 5 files changed, 1311 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 be3ac7d41f..cedb72133d 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/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index d9ad8218cb..98cc48cfa8 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4497,6 +4497,14 @@ div .suggestion_note { .item-date-due { display: block; } + + .unavailable-list { + color: #990033; + } + + .available { + color: #006600; + } } #camera, 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 0000000000..d4dc75f5f6 --- /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 b30efc0e06..9c16fffc02 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: + + + + + + + , + + + , .. + + + + + + . + + + +