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

(-)a/installer/data/mysql/atomicupdate/bug_30633.pl (+19 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "30633",
6
    description => "Remove system preference OPACHoldingsDefaultSortField",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{
13
            DELETE FROM systempreferences
14
            WHERE variable="OPACHoldingsDefaultSortField";
15
        }
16
            ) == 1
17
            && say $out "Removed system preference 'OPACHoldingsDefaultSortField'";
18
    },
19
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 514-520 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
514
('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by comma, that can see items otherwise hidden by OpacHiddenItems','Textarea'),
514
('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by comma, that can see items otherwise hidden by OpacHiddenItems','Textarea'),
515
('OpacHiddenItemsHidesRecord','1','','Hide biblio record when all its items are hidden because of OpacHiddenItems','YesNo'),
515
('OpacHiddenItemsHidesRecord','1','','Hide biblio record when all its items are hidden because of OpacHiddenItems','YesNo'),
516
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
516
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
517
('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'),
518
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
517
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
519
('OPACHoldRequests','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
518
('OPACHoldRequests','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
520
('OPACHoldsHistory','0','','If ON, enables display of Patron Holds History in OPAC','YesNo'),
519
('OPACHoldsHistory','0','','If ON, enables display of Patron Holds History in OPAC','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-7 lines)
Lines 317-329 OPAC: Link Here
317
                homebranch: 'home library'
317
                homebranch: 'home library'
318
                holdingbranch: 'holding library'
318
                holdingbranch: 'holding library'
319
            - "is the logged in patrons's library. The second tab will contain all other items."
319
            - "is the logged in patrons's library. The second tab will contain all other items."
320
        -
321
            - pref: OPACHoldingsDefaultSortField
322
              choices:
323
                  first_column: First column of the table
324
                  homebranch: Home library
325
                  holdingbranch: Holding library
326
            - "is the default sort field for the holdings table."
327
        -
320
        -
328
            - Display up to
321
            - Display up to
329
            - pref: OpacMaxItemsToDisplay
322
            - pref: OpacMaxItemsToDisplay
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-10 lines)
Lines 2002-2016 Link Here
2002
                    });
2002
                    });
2003
            [% END %]
2003
            [% END %]
2004
2004
2005
            [%# Note that there is no way atm to target a column with its class name to set it as the default sort order %]
2006
            [% IF Koha.Preference('OpacLocationBranchToDisplay') == 'home' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND item_level_itypes OR Koha.Preference('OpacLocationBranchToDisplay') == 'holding' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'holdingbranch' AND item_level_itypes OR Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND NOT item_level_itypes OR Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'holdingbranch' AND item_level_itypes %]
2007
                var default_order_index = 1;
2008
            [% ELSIF Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND item_level_itypes %]
2009
                var default_order_index = 2;
2010
            [% ELSE %]
2011
                var default_order_index = 0;
2012
            [% END %]
2013
2014
            [% IF ( query_desc ) %]
2005
            [% IF ( query_desc ) %]
2015
                [% IF ( OpacHighlightedWords ) %]
2006
                [% IF ( OpacHighlightedWords ) %]
2016
                    var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
2007
                    var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
2017
- 

Return to bug 30633