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

(-)a/C4/Auth.pm (-1 / +11 lines)
Lines 408-414 sub get_template_and_user { Link Here
408
            opaccolorstylesheet       => C4::Context->preference("opaccolorstylesheet"),
408
            opaccolorstylesheet       => C4::Context->preference("opaccolorstylesheet"),
409
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
409
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
410
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
410
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
411
            BranchesLoop              => GetBranchesLoop($opac_name),
411
            BranchesLoop              => do {
412
                my @exclude_branches = split( /\|/, C4::Context->preference('OpacHideBranches') );
413
                my $tmpbranches = GetBranchesLoop($opac_name);
414
                if (scalar(@exclude_branches)) {
415
                    my %tmp = map { $_ => 1 } @exclude_branches;
416
                    my @include_branches = grep { ! defined($tmp{$_->{branchcode}}) } @$tmpbranches;
417
                    \@include_branches;
418
                } else {
419
                    $tmpbranches;
420
                }
421
            },
412
            BranchCategoriesLoop      => GetBranchCategories( 'searchdomain', 1, $opac_name ),
422
            BranchCategoriesLoop      => GetBranchCategories( 'searchdomain', 1, $opac_name ),
413
            CalendarFirstDayOfWeek    => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1,
423
            CalendarFirstDayOfWeek    => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1,
414
            LibraryName               => "" . C4::Context->preference("LibraryName"),
424
            LibraryName               => "" . C4::Context->preference("LibraryName"),
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 235-240 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
235
('OPACFRBRizeEditions','0','','If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
235
('OPACFRBRizeEditions','0','','If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
236
('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'),
236
('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'),
237
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'),
237
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'),
238
('OpacHideBranches','',NULL,'Hide these branches from OPAC search branches pull-down. (Use short branch names, separated by pipe-characters.)','Free'),
238
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
239
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
239
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
240
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
240
('OPACItemHolds','1','','Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy.','YesNo'),
241
('OPACItemHolds','1','','Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy.','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+19 lines)
Lines 8465-8470 if ( CheckVersion($DBversion) ) { Link Here
8465
    SetVersion($DBversion);
8465
    SetVersion($DBversion);
8466
}
8466
}
8467
8467
8468
$DBversion = "3.15.00.XXX";
8469
if ( CheckVersion($DBversion) ) {
8470
    $dbh->do("
8471
        INSERT INTO systempreferences (
8472
            variable,
8473
            value,
8474
            explanation,
8475
            type
8476
        ) VALUES (
8477
            'OpacHideBranches',
8478
            '',
8479
            'Hide these branches from OPAC search branches pull-down. (Use short branch names, separated by pipe-characters.)',
8480
            'Free'
8481
        )
8482
    ");
8483
    print "Upgrade to $DBversion done (Bug 12242 - Allow hiding branches from the OPAC search pulldowns)\n";
8484
    SetVersion($DBversion);
8485
}
8486
8468
=head1 FUNCTIONS
8487
=head1 FUNCTIONS
8469
8488
8470
=head2 TableExists($table)
8489
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +3 lines)
Lines 131-136 OPAC: Link Here
131
                  no: "Don't show"
131
                  no: "Don't show"
132
            - the item's barcode on the holdings tab.
132
            - the item's barcode on the holdings tab.
133
        -
133
        -
134
            - pref: OpacHideBranches
135
            - Hide these branches from OPAC search branches pull-down. (Use short branch names, separated by pipe-characters.)
136
        -
134
            - pref: OpacHighlightedWords
137
            - pref: OpacHighlightedWords
135
              choices:
138
              choices:
136
                  yes: Highlight
139
                  yes: Highlight
137
- 

Return to bug 12242