@@ -, +, @@
that have different home and holding libraries.
---
C4/XSLT.pm | 19 +++--
installer/data/mysql/atomicupdate/bug_7441.sql | 2 +
installer/data/mysql/sysprefs.sql | 1 +
.../prog/en/modules/admin/preferences/opac.pref | 6 ++
.../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 89 +++++++++++++---------
.../bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl | 58 +++++++++-----
6 files changed, 116 insertions(+), 59 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_7441.sql
--- a/C4/XSLT.pm
+++ a/C4/XSLT.pm
@@ -170,7 +170,8 @@ sub get_xslt_sysprefs {
UseControlNumber IntranetBiblioDefaultView BiblioDefaultView
OPACItemLocation DisplayIconsXSLT
AlternateHoldingsField AlternateHoldingsSeparator
- TrackClicks opacthemes IdRef OpacSuppression / )
+ TrackClicks opacthemes IdRef OpacSuppression
+ OPACResultsLibrary / )
{
my $sp = C4::Context->preference( $syspref );
next unless defined($sp);
@@ -310,13 +311,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."";
return $xml;
--- a/installer/data/mysql/atomicupdate/bug_7441.sql
+++ a/installer/data/mysql/atomicupdate/bug_7441.sql
@@ -0,0 +1,2 @@
+INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES
+('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice');
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -333,6 +333,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OpacRenewalAllowed','0',NULL,'If ON, users can renew their issues directly from their OPAC account','YesNo'),
('OpacRenewalBranch','checkoutbranch','itemhomebranch|patronhomebranch|checkoutbranch|null','Choose how the branch for an OPAC renewal is recorded in statistics','Choice'),
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
+('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'),
('OPACSearchForTitleIn','
Other Libraries (WorldCat)\nOther Databases (Google Scholar)\nOnline Stores (Bookfinder.com)\nOpen Library (openlibrary.org)','70|10','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','Textarea'),
('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -1,6 +1,12 @@
OPAC:
Appearance:
-
+ - For search results in the OPAC, show the item's
+ - pref: OPACResultsLibrary
+ choices:
+ holdingbranch: "current location"
+ homebranch: "home library"
+ -
- Use the
- pref: opacthemes
choices: opac-templates
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
@@ -10,7 +10,8 @@
-
+
+
@@ -20,6 +21,7 @@
+
@@ -1166,35 +1168,54 @@
-
-
-
- [Call number: ]
- (
-
- )
-
- .
- ,
-
-
-
-
-
-
-
-
- [Call number: ]
- (
-
- )
-
- .
- ,
-
-
-
-
+
+
+
+ [Call number: ]
+ (
+
+ )
+
+ .
+ ,
+
+
+
+
+
+
+
+
+
+
+ [Call number: ]
+ (
+
+ )
+
+ .
+ ,
+
+
+
+
+
+
+
+
+ [Call number: ]
+ (
+
+ )
+
+ .
+ ,
+
+
+
+
+
+
@@ -1206,14 +1227,14 @@
Items available for reference:
-
+
[Call number: ]
(
-
+
)
. ,
@@ -1280,7 +1301,7 @@
-
+
@@ -1293,7 +1314,7 @@
-
+
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl
@@ -11,7 +11,8 @@
-
+
+
@@ -25,6 +26,7 @@
select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/>
+
@@ -146,31 +148,53 @@
-
+
[]
(
-
+
)
. ,
-
-
- []
-
- (
-
- )
-
-
- .
+
+
+
+
+ []
+
+ (
+
+ )
+
+
+ .
+
+
+ ,
+
+
+
- ,
+
+
+ []
+
+ (
+
+ )
+
+
+ .
+
+
+ ,
+
+
+
-
@@ -182,13 +206,13 @@
Items available for reference:
-
+
[]
(
-
+
)
--