Bugzilla – Attachment 124245 Details for
Bug 26302
OPAC XSLT Results: List variable number of itemcallnumbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26302: (QA follow-up) Prefix prefs with OPAC
Bug-26302-QA-follow-up-Prefix-prefs-with-OPAC.patch (text/plain), 9.45 KB, created by
Marcel de Rooy
on 2021-08-30 14:25:42 UTC
(
hide
)
Description:
Bug 26302: (QA follow-up) Prefix prefs with OPAC
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-08-30 14:25:42 UTC
Size:
9.45 KB
patch
obsolete
>From 14cac9b69abf08439fc8c811fec5af63aeaa2969 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 30 Aug 2021 14:18:20 +0000 >Subject: [PATCH] Bug 26302: (QA follow-up) Prefix prefs with OPAC >Content-Type: text/plain; charset=utf-8 > >git grep -l "ResultsMaxItems" | xargs sed -i -e "/ResultsMaxItems/ s/ResultsMaxItems/OPACResultsMaxItems/g" > >And line: >koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl: <xsl:variable name="OPACResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='resultsMaxItems']+0)"/> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/XSLT.pm | 2 +- > installer/data/mysql/atomicupdate/bug_26302.perl | 6 +++--- > installer/data/mysql/mandatory/sysprefs.sql | 4 ++-- > .../prog/en/modules/admin/preferences/opac.pref | 4 ++-- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 10 +++++----- > t/db_dependent/XSLT.t | 2 +- > 6 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 57467eaf0a..a96d60b1ec 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -172,7 +172,7 @@ sub get_xslt_sysprefs { > TrackClicks opacthemes IdRef OpacSuppression > OPACResultsLibrary OPACShowOpenURL > OpenURLResolverURL OpenURLImageLocation >- ResultsMaxItems ResultsMaxItemsUnavailable >+ OPACResultsMaxItems OPACResultsMaxItemsUnavailable > OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / ) > { > my $sp = C4::Context->preference( $syspref ); >diff --git a/installer/data/mysql/atomicupdate/bug_26302.perl b/installer/data/mysql/atomicupdate/bug_26302.perl >index 80b91be718..0fc7689cfe 100644 >--- a/installer/data/mysql/atomicupdate/bug_26302.perl >+++ b/installer/data/mysql/atomicupdate/bug_26302.perl >@@ -2,8 +2,8 @@ $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { > $dbh->do(q| > INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES >- ('ResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), >- ('ResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer') >+ ('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), >+ ('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer') > |); >- NewVersion( $DBversion, 26302, "Add preferences ResultsMaxItems and ResultsMaxItemsUnavailable"); >+ NewVersion( $DBversion, 26302, "Add preferences OPACResultsMaxItems and OPACResultsMaxItemsUnavailable"); > } >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index aaa48dadeb..4061f94cd3 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -574,8 +574,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'), > ('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'), > ('RestrictionBlockRenewing','0',NULL,'If patron is restricted, should renewal be allowed or blocked','YesNo'), >-('ResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), >-('ResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'), >+('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), >+('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'), > ('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'), > ('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'), > ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), >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 d2600c5cc9..34913d4e54 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 >@@ -345,9 +345,9 @@ OPAC: > - "(Use | as delimiter.)" > - > - Show no more than >- - pref: ResultsMaxItems >+ - pref: OPACResultsMaxItems > - (available) individual items on the OPAC XSLT search results, and show no more than >- - pref: ResultsMaxItemsUnavailable >+ - pref: OPACResultsMaxItemsUnavailable > - "'really unavailable' individual items in categories like Checked out, Damaged, On Hold, etc." > > Features: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index c46e6f3c94..e90961b21a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -23,8 +23,8 @@ > <!-- Option: Display Alternate Graphic Representation (MARC 880) --> > <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> > >- <xsl:variable name="ResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='resultsMaxItems']+0)"/> >- <xsl:variable name="ResultsMaxItemsUnavailable" select="number(marc:sysprefs/marc:syspref[@name='ResultsMaxItemsUnavailable']+0)"/> >+ <xsl:variable name="OPACResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='OPACResultsMaxItems']+0)"/> >+ <xsl:variable name="OPACResultsMaxItemsUnavailable" select="number(marc:sysprefs/marc:syspref[@name='OPACResultsMaxItemsUnavailable']+0)"/> > <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/> > <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/> > <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/> >@@ -1284,7 +1284,7 @@ > <span class="ItemSummary"> > <xsl:call-template name="listCallNumbers"> > <xsl:with-param name="items" select="$available_items[items:resultbranch=$currentbranch]"/> >- <xsl:with-param name="max" select="$ResultsMaxItems"/> >+ <xsl:with-param name="max" select="$OPACResultsMaxItems"/> > <xsl:with-param name="status_text" select="$currentbranch"/> > <xsl:with-param name="class_status" select="ItemBranch"/> > <xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/> >@@ -1307,7 +1307,7 @@ > <span class="ItemSummary"> > <xsl:call-template name="listCallNumbers"> > <xsl:with-param name="items" select="$reference_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/> >- <xsl:with-param name="max" select="$ResultsMaxItems"/> >+ <xsl:with-param name="max" select="$OPACResultsMaxItems"/> > <xsl:with-param name="status_text" select="concat($currentbranch,': ',$current_substatus)"/> > <xsl:with-param name="class_block" select="concat('notforloandesc_',$current_substatus)"/> > <xsl:with-param name="class_status" select="ItemBranch"/> >@@ -1342,7 +1342,7 @@ > <xsl:variable name="current_substatus" select="items:substatus"/> > <xsl:call-template name="listCallNumbers"> > <xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/> >- <xsl:with-param name="max" select="$ResultsMaxItemsUnavailable"/> >+ <xsl:with-param name="max" select="$OPACResultsMaxItemsUnavailable"/> > <xsl:with-param name="status_text"> > <xsl:value-of select="$currentbranch"/> > <xsl:text>: </xsl:text> >diff --git a/t/db_dependent/XSLT.t b/t/db_dependent/XSLT.t >index 38079fecdc..9cda1c5b8c 100755 >--- a/t/db_dependent/XSLT.t >+++ b/t/db_dependent/XSLT.t >@@ -52,7 +52,7 @@ subtest 'buildKohaItemsNamespace status tests' => sub { > > t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2'); > t::lib::Mocks::mock_preference( 'OPACResultsLibrary', 'holdingbranch' ); >- t::lib::Mocks::mock_preference( 'ResultsMaxItems', '2' ); >+ t::lib::Mocks::mock_preference( 'OPACResultsMaxItems', '2' ); > > my $itype = $builder->build_object({ class => 'Koha::ItemTypes' }); > my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' }); >-- >2.20.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 26302
:
109184
|
119108
|
119109
|
119110
|
119111
|
122386
|
122387
|
122388
|
122389
|
122391
|
122462
|
122463
|
122464
|
122465
|
122466
|
122487
|
123499
|
123500
|
123501
|
123502
|
123526
|
123527
|
123528
|
123529
|
123531
|
123532
|
123533
|
123534
|
123640
|
123641
|
123643
|
123644
|
123645
|
123646
|
123647
|
123648
|
123649
|
124243
|
124244
| 124245