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

(-)a/installer/data/mysql/atomicupdate/bug_30880_-_add_option_OPACResultsUnavailableGroupingBy_syspref.pl (+12 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30880",
5
    description => "Add branchonly option to OPACResultsUnavailableGroupingBy syspref",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{ UPDATE systempreferences SET options = 'branch|substatus|branchonly', explanation = 'Group OPAC XSLT results by branch and substatus, or substatus only, or branch only' WHERE variable = 'OPACResultsUnavailableGroupingBy' });
11
    },
12
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 464-470 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
464
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
464
('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'),
465
('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
465
('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'),
466
('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'),
466
('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'),
467
('OPACResultsUnavailableGroupingBy','branch','branch|substatus','Group OPAC XSLT results by branch or substatus','Choice'),
467
('OPACResultsUnavailableGroupingBy','branch','branch|substatus|branchonly','Group OPAC XSLT results by branch and substatus, or substatus only, or branch only','Choice'),
468
('OPACSearchForTitleIn','<a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a>\n<a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a>\n<a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&amp;title={TITLE}&amp;st=xl&amp;ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a>\n<a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a>','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'),
468
('OPACSearchForTitleIn','<a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a>\n<a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a>\n<a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&amp;title={TITLE}&amp;st=xl&amp;ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a>\n<a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a>','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'),
469
('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'),
469
('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'),
470
('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'),
470
('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-2 / +3 lines)
Lines 330-337 OPAC: Link Here
330
            - Group unavailable items by
330
            - Group unavailable items by
331
            - pref: OPACResultsUnavailableGroupingBy
331
            - pref: OPACResultsUnavailableGroupingBy
332
              choices:
332
              choices:
333
                  branch: "branch"
333
                  branch: "branch and substatus"
334
                  substatus: "substatus"
334
                  substatus: "substatus only"
335
                  branchonly: "branch only"
335
            - ". (NOTE: For large consortia we recommend to group unavailable items by substatus, listing item counts only.)"
336
            - ". (NOTE: For large consortia we recommend to group unavailable items by substatus, listing item counts only.)"
336
337
337
    Features:
338
    Features:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-1 / +18 lines)
Lines 1387-1392 Link Here
1387
                                    </xsl:call-template>
1387
                                    </xsl:call-template>
1388
                                </xsl:for-each>
1388
                                </xsl:for-each>
1389
                            </xsl:when>
1389
                            </xsl:when>
1390
                            <xsl:when test="$OPACResultsUnavailableGroupingBy='branchonly'">
1391
                                <!-- Only group by branch, do not list substatuses and individual call numbers -->
1392
                                <xsl:for-each select="items:items/items:item[not(items:resultbranch=preceding-sibling::*/items:resultbranch)]">
1393
                                    <xsl:sort select="items:resultbranch"/>
1394
                                    <xsl:variable name="currentbranch" select="items:resultbranch"/>
1395
                                    <xsl:if test="count($unavailable_items[items:resultbranch=$currentbranch])>0">
1396
                                        <span class="ItemSummary unavailable">
1397
                                            <xsl:value-of select="$currentbranch"/>
1398
                                            <span class="unavailable">
1399
                                                <xsl:text> (</xsl:text>
1400
                                                <xsl:value-of select="count($unavailable_items[items:resultbranch=$currentbranch])"/>
1401
                                                <xsl:text>)</xsl:text>
1402
                                            </span>
1403
                                        <xsl:text>. </xsl:text>
1404
                                        </span>
1405
                                    </xsl:if>
1406
                                </xsl:for-each>
1407
                            </xsl:when>
1390
                        </xsl:choose>
1408
                        </xsl:choose>
1391
                    </span></xsl:if>
1409
                    </span></xsl:if>
1392
1410
1393
- 

Return to bug 30880