@@ -, +, @@
---
C4/XSLT.pm | 18 ++--
installer/data/mysql/sysprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 7 ++
.../prog/en/modules/admin/preferences/opac.pref | 7 ++
.../prog/en/xslt/MARC21slim2OPACResults.xsl | 103 ++++++++++++--------
5 files changed, 89 insertions(+), 47 deletions(-)
--- a/C4/XSLT.pm
+++ a/C4/XSLT.pm
@@ -207,7 +207,7 @@ sub XSLTParse4Display {
UseControlNumber IntranetBiblioDefaultView BiblioDefaultView
singleBranchMode OPACItemLocation DisplayIconsXSLT
AlternateHoldingsField AlternateHoldingsSeparator
- TrackClicks / )
+ TrackClicks OPACResultsBranchXSLT / )
{
my $sp = C4::Context->preference( $syspref );
next unless defined($sp);
@@ -300,13 +300,15 @@ sub buildKohaItemsNamespace {
$location = $item->{location}? xml_escape($shelflocations->{$item->{location}}||$item->{location}):'';
$ccode = $item->{ccode}? xml_escape($ccodes->{$item->{ccode}}||$item->{ccode}):'';
my $itemcallnumber = xml_escape($item->{itemcallnumber});
- $xml.= "- $homebranch".
- "$holdingbranch".
- "$location".
- "$ccode".
- "$status".
- "".$itemcallnumber.""
- . "
";
+ $xml .=
+ "- "
+ . "$homebranch"
+ . "$holdingbranch"
+ . "$location"
+ . "$ccode"
+ . "$status"
+ . "$itemcallnumber"
+ . "
";
}
$xml = "".$xml."";
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -427,3 +427,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
+INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('OPACResultsBranchXSLT', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice');
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -6991,6 +6991,13 @@ if ( CheckVersion($DBversion) ) {
}
+$DBversion = "3.13.00.XXX";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('OPACResultsBranchXSLT', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice')");
+ print "Upgrade to $DBversion done (Add syspref OPACResultsBranchXSLT)\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -83,6 +83,13 @@ OPAC:
no: "Don't show"
- the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.
-
+ - On search result pages displayed with XSLT stylesheets on the OPAC, show the item's
+ - pref: OPACResultsBranchXSLT
+ choices:
+ holdingbranch: "holding branch"
+ homebranch: "home branch"
+ - icons for itemtype and authorized values.
+ -
- pref: COinSinOPACResults
choices:
yes: Include
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
+++ a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
@@ -9,7 +9,8 @@
-
+
+
@@ -19,6 +20,7 @@
+
@@ -1051,53 +1053,76 @@
-
-
- []
- (
-
- )
- . ,
+
+
+ []
+ (
+
+ )
+ . ,
+
+
+
+
+
+
+
+ []
+ (
+
+ )
+ . ,
-
-
-
-
- []
- (
-
- )
- . ,
+
+
+
+
+ []
+ (
+
+ )
+ . ,
-
+
+
+
-
-
-
- Copies available for reference:
-
-
-
- []
- (
-
- )
- . ,
-
-
-
-
+
+
+
+ Copies available for reference:
+
-
-
-
-
-
+
+
+
+
+ []
+ (
+
+ )
+ . ,
+
+
+
+
+
+ []
+ (
+
+ )
+ . ,
+
+
+
+
+
+
--