Bugzilla – Attachment 52743 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]
[SIGNED-OFF]Bug 15485: (QA followup) Simplify logic and use *ResultsDisplay value during upgrade
SIGNED-OFFBug-15485-QA-followup-Simplify-logic-and.patch (text/plain), 10.27 KB, created by
Héctor Eduardo Castro Avalos
on 2016-06-23 15:27:21 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15485: (QA followup) Simplify logic and use *ResultsDisplay value during upgrade
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-06-23 15:27:21 UTC
Size:
10.27 KB
patch
obsolete
>From fc396e6654ba2894da3fca09152a2e5ad30fdcdf Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 22 Jun 2016 14:52:03 -0300 >Subject: [PATCH] [SIGNED-OFF]Bug 15485: (QA followup) Simplify logic and use > *ResultsDisplay value during upgrade > >This patch makes the new sysprefs work as the previously defined. Instead of falling back >to what *ResultsDisplay is set, it now has its own 'default' (that still defaults to the >*Results*.xslt). > >The default values are set to 'default' as the rest of XSLT-related sysprefs, and the upgrade >picks whatever is set in OPACXSLTResultsDisplay and XSLTResultsDisplay so current behaviour >is preserved. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >New XSLTs for Lists work as advertised >--- > .../atomicupdate/bug_15485_xslt_for_lists.sql | 23 ++++++++++++-------- > installer/data/mysql/sysprefs.sql | 4 ++-- > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../en/modules/admin/preferences/staff_client.pref | 2 +- > opac/opac-shelves.pl | 3 +-- > virtualshelves/shelves.pl | 4 +--- > 6 files changed, 20 insertions(+), 18 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 96cb493..7356889 100644 >--- a/installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql >+++ b/installer/data/mysql/atomicupdate/bug_15485_xslt_for_lists.sql >@@ -1,19 +1,24 @@ >-INSERT IGNORE INTO systempreferences ( variable, value, options, explanation,type ) >-VALUES ('OPACXSLTListsDisplay','','','Enable XSLT stylesheet control over lists pages display on OPAC','Free'); >-INSERT IGNORE INTO systempreferences ( variable, value, options, explanation,type ) >-VALUES ('XSLTListsDisplay','','','Enable XSLT stylesheet control over lists pages display on intranet','Free'); >+ >+INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) >+ SELECT 'OPACXSLTListsDisplay', COALESCE(value,''), '', 'Enable XSLT stylesheet control over lists pages display on OPAC', 'Free' >+ FROM systempreferences WHERE variable='OPACXSLTResultsDisplay'; >+ >+INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) >+ SELECT 'XSLTListsDisplay', COALESCE(value,''), '', 'Enable XSLT stylesheet control over lists pages display on intranet', 'Free' >+ FROM systempreferences WHERE variable='XSLTResultsDisplay'; > > -- $DBversion = '16.06.00.XXX'; > -- if ( CheckVersion($DBversion) ) { > -- $dbh->do(q{ >--- INSERT IGNORE INTO systempreferences ( variable, value, options, explanation,type ) >--- VALUES ('OPACXSLTListsDisplay','','','Enable XSLT stylesheet control over lists pages display on OPAC','Free') >+-- INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) >+-- SELECT 'OPACXSLTListsDisplay', COALESCE(value,''), '', 'Enable XSLT stylesheet control over lists pages display on OPAC', 'Free' >+-- FROM systempreferences WHERE variable='OPACXSLTResultsDisplay'; > -- }); > > -- $dbh->do(q{ >--- INSERT IGNORE INTO systempreferences ( variable, value, options, explanation,type ) >--- VALUES ('XSLTListsDisplay','','','Enable XSLT stylesheet control over lists pages display on intranet','Free') >- >+-- INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) >+-- SELECT 'XSLTListsDisplay', COALESCE(value,''), '', 'Enable XSLT stylesheet control over lists pages display on intranet', 'Free' >+-- FROM systempreferences WHERE variable='XSLTResultsDisplay'; > -- }); > > -- print "Upgrade to $DBversion done (Bug 15485: Allow choosing different XSLTs for lists)\n"; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 1c2854a..08857dc 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -359,7 +359,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('opacuserlogin','1',NULL,'Enable or disable display of user login features','YesNo'), > ('OPACViewOthersSuggestions','0',NULL,'If ON, allows all suggestions to be displayed in the OPAC','YesNo'), > ('OPACXSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on OPAC','Free'), >-('OPACXSLTListsDisplay','','','Enable XSLT stylesheet control over lists pages 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'), > ('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'), >@@ -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','','','Enable XSLT stylesheet control over lists pages display on intranet','Free'), >+('XSLTListsDisplay','default','','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/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 87bd661..0ebbf61 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -83,7 +83,7 @@ OPAC: > - 'Display lists in the OPAC using XSLT stylesheet at: ' > - pref: OPACXSLTListsDisplay > class: file >- - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTListsDisplay" data-value="">Leave empty</a> for the default stylesheet (picked from OPACXSLTResultsDisplay).</li><li> put a path to define an xslt file.</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' >+ - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTListsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTListsDisplay" data-value="default">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' > - > - 'Display OPAC results using XSLT stylesheet at: ' > - pref: OPACXSLTResultsDisplay >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >index e10ce5d..4673641 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >@@ -59,7 +59,7 @@ Staff Client: > - 'Display lists in the staff client using XSLT stylesheet at: ' > - pref: XSLTListsDisplay > class: file >- - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="XSLTListsDisplay" data-value="">Leave empty</a> for the default stylesheet (picked from XSLTResultsDisplay).</li><li> put a path to define an xslt file.</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' >+ - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="XSLTListsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="XSLTListsDisplay" data-value="default">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' > - > - 'Display results in the staff client using XSLT stylesheet at: ' > - pref: XSLTResultsDisplay >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 75b7e94..54d93a1 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -249,8 +249,7 @@ if ( $op eq 'view' ) { > my $borrower = GetMember( borrowernumber => $loggedinuser ); > > # Lists display falls back to search results configuration >- my $xslfile = C4::Context->preference('OPACXSLTListsDisplay') || >- C4::Context->preference('OPACXSLTResultsDisplay'); >+ my $xslfile = C4::Context->preference('OPACXSLTListsDisplay'); > 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 98ff255..0540f3e 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -215,9 +215,7 @@ if ( $op eq 'view' ) { > > my $borrower = GetMember( borrowernumber => $loggedinuser ); > >- # Lists display falls back to search results configuration >- my $xslfile = C4::Context->preference('XSLTListsDisplay') || >- C4::Context->preference('XSLTResultsDisplay'); >+ my $xslfile = C4::Context->preference('XSLTListsDisplay'); > my $lang = $xslfile ? C4::Languages::getlanguage() : undef; > my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; > >-- >1.7.10.4
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