Bugzilla – Attachment 52740 Details for
Bug 15485
Allow choosing different XSLTs for lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15485: (QA followup) Fix behaviour and default values
Bug-15485-QA-followup-Fix-behaviour-and-default-va.patch (text/plain), 4.68 KB, created by
Jonathan Druart
on 2016-06-23 15:02:26 UTC
(
hide
)
Description:
Bug 15485: (QA followup) Fix behaviour and default values
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-23 15:02:26 UTC
Size:
4.68 KB
patch
obsolete
>From 32f852076e00ab8c756f87aa58fa323db04595d3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 14 Jun 2016 13:16:13 -0300 >Subject: [PATCH] Bug 15485: (QA followup) Fix behaviour and default values > >Jonathan noticed the current behaviour is that the lists rendering >falls back to the XSLTResults, and if not defined (i.e. != 'default' and >!= some_path) it falls back to a legacy display (non-XSLT). > >The patchset changed this behaviour because 'default' is not a valid value >for the lists. So it should fallback to the current behaivour (i.e. Results >XSLT configuration) if not defined. This patch fixes this by adding > || C4::Context->preference('XSLTResultsDisplay') >(and the OPAC counterpart). > >It also fixes minor glitches on the update message (oops) and bad default value >in sysprefs.sql for 'XSLTListsDisplay'. > >Thanks Jonathan! > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql | 2 +- > installer/data/mysql/sysprefs.sql | 2 +- > opac/opac-shelves.pl | 4 +++- > virtualshelves/shelves.pl | 4 +++- > 4 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql b/installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql >index f81813c..96cb493 100644 >--- a/installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql >+++ b/installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql >@@ -16,6 +16,6 @@ VALUES ('XSLTListsDisplay','','','Enable XSLT stylesheet control over lists page > > -- }); > >--- print "Upgrade to $DBversion done (Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC)\n"; >+-- print "Upgrade to $DBversion done (Bug 15485: Allow choosing different XSLTs for lists)\n"; > -- SetVersion($DBversion); > -- } >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 51f651e..1c2854a 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -534,7 +534,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('XISBN','0','','Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','YesNo'), > ('XISBNDailyLimit','999','','The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','Integer'), > ('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'), >-('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'), >+('XSLTListsDisplay','','','Enable XSLT stylesheet control over lists pages display on intranet','Free'), > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), > ('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 7ebef65..75b7e94 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -248,7 +248,9 @@ if ( $op eq 'view' ) { > > my $borrower = GetMember( borrowernumber => $loggedinuser ); > >- my $xslfile = C4::Context->preference('OPACXSLTListsDisplay'); >+ # Lists display falls back to search results configuration >+ my $xslfile = C4::Context->preference('OPACXSLTListsDisplay') || >+ C4::Context->preference('OPACXSLTResultsDisplay'); > my $lang = $xslfile ? C4::Languages::getlanguage() : undef; > my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; > >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index d58cf7b..98ff255 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -215,7 +215,9 @@ if ( $op eq 'view' ) { > > my $borrower = GetMember( borrowernumber => $loggedinuser ); > >- my $xslfile = C4::Context->preference('XSLTListsDisplay') || 'default'; >+ # Lists display falls back to search results configuration >+ my $xslfile = C4::Context->preference('XSLTListsDisplay') || >+ C4::Context->preference('XSLTResultsDisplay'); > my $lang = $xslfile ? C4::Languages::getlanguage() : undef; > my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; > >-- >2.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15485
:
52175
|
52176
|
52314
|
52315
|
52320
|
52321
|
52398
|
52701
|
52738
|
52739
|
52740
|
52741
|
52742
|
52743