View | Details | Raw Unified | Return to bug 26302
Collapse All | Expand All

(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 172-178 sub get_xslt_sysprefs { Link Here
172
                              TrackClicks opacthemes IdRef OpacSuppression
172
                              TrackClicks opacthemes IdRef OpacSuppression
173
                              OPACResultsLibrary OPACShowOpenURL
173
                              OPACResultsLibrary OPACShowOpenURL
174
                              OpenURLResolverURL OpenURLImageLocation
174
                              OpenURLResolverURL OpenURLImageLocation
175
                              resultsMaxItems resultsMaxItemsUnavailable
175
                              ResultsMaxItems ResultsMaxItemsUnavailable
176
                              OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / )
176
                              OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / )
177
    {
177
    {
178
        my $sp = C4::Context->preference( $syspref );
178
        my $sp = C4::Context->preference( $syspref );
(-)a/installer/data/mysql/atomicupdate/bug_26302.perl (-3 / +3 lines)
Lines 2-9 $DBversion = 'XXX'; # will be replaced by the RM Link Here
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q|
3
    $dbh->do(q|
4
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES
4
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES
5
            ('resultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'),
5
            ('ResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'),
6
            ('resultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer')
6
            ('ResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer')
7
    |);
7
    |);
8
    NewVersion( $DBversion, 26302, "Add preferences resultsMaxItems and resultsMaxItemsUnavailable");
8
    NewVersion( $DBversion, 26302, "Add preferences ResultsMaxItems and ResultsMaxItemsUnavailable");
9
}
9
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-2 / +2 lines)
Lines 575-582 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
575
('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'),
575
('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'),
576
('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'),
576
('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'),
577
('RestrictionBlockRenewing','0',NULL,'If patron is restricted, should renewal be allowed or blocked','YesNo'),
577
('RestrictionBlockRenewing','0',NULL,'If patron is restricted, should renewal be allowed or blocked','YesNo'),
578
('resultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'),
578
('ResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'),
579
('resultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'),
579
('ResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'),
580
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
580
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
581
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
581
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
582
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
582
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-2 / +2 lines)
Lines 345-353 OPAC: Link Here
345
            - "(Use | as delimiter.)"
345
            - "(Use | as delimiter.)"
346
        -
346
        -
347
            - Show no more than
347
            - Show no more than
348
            - pref: resultsMaxItems
348
            - pref: ResultsMaxItems
349
            - (available) individual items on the OPAC XSLT search results, and show no more than
349
            - (available) individual items on the OPAC XSLT search results, and show no more than
350
            - pref: resultsMaxItemsUnavailable
350
            - pref: ResultsMaxItemsUnavailable
351
            - "'really unavailable' individual items in categories like Checked out, Damaged, On Hold, etc."
351
            - "'really unavailable' individual items in categories like Checked out, Damaged, On Hold, etc."
352
352
353
    Features:
353
    Features:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-5 / +5 lines)
Lines 23-30 Link Here
23
        <!-- Option: Display Alternate Graphic Representation (MARC 880)  -->
23
        <!-- Option: Display Alternate Graphic Representation (MARC 880)  -->
24
        <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
24
        <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
25
25
26
    <xsl:variable name="resultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='resultsMaxItems']+0)"/>
26
    <xsl:variable name="ResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='resultsMaxItems']+0)"/>
27
    <xsl:variable name="resultsMaxItemsUnavailable" select="number(marc:sysprefs/marc:syspref[@name='resultsMaxItemsUnavailable']+0)"/>
27
    <xsl:variable name="ResultsMaxItemsUnavailable" select="number(marc:sysprefs/marc:syspref[@name='ResultsMaxItemsUnavailable']+0)"/>
28
    <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
28
    <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
29
    <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
29
    <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
30
    <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/>
30
    <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/>
Lines 1284-1290 Link Here
1284
                            <span class="ItemSummary">
1284
                            <span class="ItemSummary">
1285
                            <xsl:call-template name="listCallNumbers">
1285
                            <xsl:call-template name="listCallNumbers">
1286
                                <xsl:with-param name="items" select="$available_items[items:resultbranch=$currentbranch]"/>
1286
                                <xsl:with-param name="items" select="$available_items[items:resultbranch=$currentbranch]"/>
1287
                                <xsl:with-param name="max" select="$resultsMaxItems"/>
1287
                                <xsl:with-param name="max" select="$ResultsMaxItems"/>
1288
                                <xsl:with-param name="status_text" select="$currentbranch"/>
1288
                                <xsl:with-param name="status_text" select="$currentbranch"/>
1289
                                <xsl:with-param name="class_status" select="ItemBranch"/>
1289
                                <xsl:with-param name="class_status" select="ItemBranch"/>
1290
                                <xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/>
1290
                                <xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/>
Lines 1307-1313 Link Here
1307
                                <span class="ItemSummary">
1307
                                <span class="ItemSummary">
1308
                                <xsl:call-template name="listCallNumbers">
1308
                                <xsl:call-template name="listCallNumbers">
1309
                                    <xsl:with-param name="items" select="$reference_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
1309
                                    <xsl:with-param name="items" select="$reference_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
1310
                                    <xsl:with-param name="max" select="$resultsMaxItems"/>
1310
                                    <xsl:with-param name="max" select="$ResultsMaxItems"/>
1311
                                    <xsl:with-param name="status_text" select="concat($currentbranch,': ',$current_substatus)"/>
1311
                                    <xsl:with-param name="status_text" select="concat($currentbranch,': ',$current_substatus)"/>
1312
                                    <xsl:with-param name="class_block" select="concat('notforloandesc_',$current_substatus)"/>
1312
                                    <xsl:with-param name="class_block" select="concat('notforloandesc_',$current_substatus)"/>
1313
                                    <xsl:with-param name="class_status" select="ItemBranch"/>
1313
                                    <xsl:with-param name="class_status" select="ItemBranch"/>
Lines 1342-1348 Link Here
1342
                                <xsl:variable name="current_substatus" select="items:substatus"/>
1342
                                <xsl:variable name="current_substatus" select="items:substatus"/>
1343
                                    <xsl:call-template name="listCallNumbers">
1343
                                    <xsl:call-template name="listCallNumbers">
1344
                                        <xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
1344
                                        <xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
1345
                                        <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/>
1345
                                        <xsl:with-param name="max" select="$ResultsMaxItemsUnavailable"/>
1346
                                        <xsl:with-param name="status_text">
1346
                                        <xsl:with-param name="status_text">
1347
                                            <xsl:value-of select="$currentbranch"/>
1347
                                            <xsl:value-of select="$currentbranch"/>
1348
                                            <xsl:text>: </xsl:text>
1348
                                            <xsl:text>: </xsl:text>
(-)a/t/db_dependent/XSLT.t (-2 / +1 lines)
Lines 52-58 subtest 'buildKohaItemsNamespace status tests' => sub { Link Here
52
52
53
    t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2');
53
    t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2');
54
    t::lib::Mocks::mock_preference( 'OPACResultsLibrary', 'holdingbranch' );
54
    t::lib::Mocks::mock_preference( 'OPACResultsLibrary', 'holdingbranch' );
55
    t::lib::Mocks::mock_preference( 'resultsMaxItems', '2' );
55
    t::lib::Mocks::mock_preference( 'ResultsMaxItems', '2' );
56
56
57
    my $itype = $builder->build_object({ class => 'Koha::ItemTypes' });
57
    my $itype = $builder->build_object({ class => 'Koha::ItemTypes' });
58
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' });
58
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' });
59
- 

Return to bug 26302