@@ -, +, @@ availability This means that not-for-loans should be listed on the Availability line as "Copies available for reference". Note that you still see them in the details view (no problem: they are listed just as what they are: not for loan). --- C4/XSLT.pm | 2 +- installer/data/mysql/atomicupdate/bug17624.perl | 9 +++++++++ installer/data/mysql/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 8 +++++++- .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 11 ++++++----- 5 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug17624.perl --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -170,7 +170,7 @@ sub get_xslt_sysprefs { OPACItemLocation DisplayIconsXSLT AlternateHoldingsField AlternateHoldingsSeparator TrackClicks opacthemes IdRef OpacSuppression - OPACResultsLibrary / ) + OPACResultsLibrary OPACXSLTResultsHideNFL / ) { my $sp = C4::Context->preference( $syspref ); next unless defined($sp); --- a/installer/data/mysql/atomicupdate/bug17624.perl +++ a/installer/data/mysql/atomicupdate/bug17624.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q| +INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('OPACXSLTResultsHideNFL', '0', NULL, 'Hide not-for-loans in OPAC XSLT results view', 'YesNo')| + ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17624 - Hide not-for-loans in OPAC XSLT results)\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -379,6 +379,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACXSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on OPAC','Free'), ('OPACXSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on OPAC','Free'), ('OPACXSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on OPAC','Free'), +('OPACXSLTResultsHideNFL','0',NULL,'Hide not-for-loans in OPAC XSLT results view','YesNo'), ('OpenLibraryCovers','0',NULL,'If ON Openlibrary book covers will be show','YesNo'), ('OpenLibrarySearch','0',NULL,'If Yes Open Library search results will show in OPAC','YesNo'), ('OrderPdfFormat','pdfformat::layout3pages','Controls what script is used for printing (basketgroups)','','free'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -61,7 +61,6 @@ OPAC: no: "Don't show" - "a warning that the OPAC is under maintenance, instead of the OPAC itself. Note: this shows the same warning as when the database needs to be upgraded, but unconditionally." - - - - "Show the following HTML when OpacMaintenance is enabled:" - pref: OpacMaintenanceNotice type: htmlarea @@ -343,6 +342,13 @@ OPAC: both: "both top and footer" top: "top" footer: "only footer" + - + - pref: OPACXSLTResultsHideNFL + default: 0 + choices: + 1: Hide + 0: Show + - not-for-loan items on the OPAC XSLT Results view. Features: - - pref: opacuserlogin --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -21,6 +21,7 @@ + @@ -1147,7 +1148,7 @@ Availability: - + @@ -1223,7 +1224,7 @@ - + Items available for reference: @@ -1244,7 +1245,7 @@ - +
@@ -1294,7 +1295,7 @@
- + Location(s): @@ -1311,7 +1312,7 @@ - + --