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

(-)a/C4/Auth.pm (-1 / +2 lines)
Lines 34-39 use C4::Search::History; Link Here
34
use Koha;
34
use Koha;
35
use Koha::AuthUtils qw(hash_password);
35
use Koha::AuthUtils qw(hash_password);
36
use Koha::LibraryCategories;
36
use Koha::LibraryCategories;
37
use Koha::Libraries;
37
use POSIX qw/strftime/;
38
use POSIX qw/strftime/;
38
use List::MoreUtils qw/ any /;
39
use List::MoreUtils qw/ any /;
39
use Encode qw( encode is_utf8);
40
use Encode qw( encode is_utf8);
Lines 422-428 sub get_template_and_user { Link Here
422
        hide_marc       => C4::Context->preference("hide_marc"),
423
        hide_marc       => C4::Context->preference("hide_marc"),
423
        item_level_itypes  => C4::Context->preference('item-level_itypes'),
424
        item_level_itypes  => C4::Context->preference('item-level_itypes'),
424
        patronimages       => C4::Context->preference("patronimages"),
425
        patronimages       => C4::Context->preference("patronimages"),
425
        singleBranchMode   => C4::Context->preference("singleBranchMode"),
426
        singleBranchMode   => ( Koha::Libraries->search->count == 1 ),
426
        XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
427
        XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
427
        XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
428
        XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
428
        using_https        => $using_https,
429
        using_https        => $using_https,
(-)a/C4/Koha.pm (-4 / +2 lines)
Lines 756-763 sub getFacets { Link Here
756
            }
756
            }
757
            ];
757
            ];
758
758
759
            unless ( C4::Context->preference("singleBranchMode")
759
            unless ( Koha::Libraries->search->count == 1 )
760
                || Koha::Libraries->search->count == 1 )
761
            {
760
            {
762
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
761
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
763
                if (   $DisplayLibraryFacets eq 'both'
762
                if (   $DisplayLibraryFacets eq 'both'
Lines 838-845 sub getFacets { Link Here
838
            },
837
            },
839
            ];
838
            ];
840
839
841
            unless ( C4::Context->preference("singleBranchMode")
840
            unless ( Koha::Libraries->search->count == 1 )
842
                || Koha::Libraries->search->count == 1 )
843
            {
841
            {
844
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
842
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
845
                if (   $DisplayLibraryFacets eq 'both'
843
                if (   $DisplayLibraryFacets eq 'both'
(-)a/C4/Search.pm (-1 / +2 lines)
Lines 31-36 use C4::Branch; Link Here
31
use C4::Reserves;    # GetReserveStatus
31
use C4::Reserves;    # GetReserveStatus
32
use C4::Debug;
32
use C4::Debug;
33
use C4::Charset;
33
use C4::Charset;
34
use Koha::Libraries;
34
use YAML;
35
use YAML;
35
use URI::Escape;
36
use URI::Escape;
36
use Business::ISBN;
37
use Business::ISBN;
Lines 618-624 sub getRecords { Link Here
618
                                $facets_info->{$link_value}->{'label_value'} =~
619
                                $facets_info->{$link_value}->{'label_value'} =~
619
                                /Libraries/
620
                                /Libraries/
620
                            )
621
                            )
621
                            and ( C4::Context->preference('singleBranchMode') )
622
                            and ( Koha::Libraries->search->count == 1 )
622
                          );
623
                          );
623
                    }
624
                    }
624
                }
625
                }
(-)a/C4/UsageStats.pm (-1 lines)
Lines 268-274 sub BuildReport { Link Here
268
        OpacRenewalBranch
268
        OpacRenewalBranch
269
        OPACViewOthersSuggestions
269
        OPACViewOthersSuggestions
270
        SearchMyLibraryFirst
270
        SearchMyLibraryFirst
271
        singleBranchMode
272
        AnonSuggestions
271
        AnonSuggestions
273
        EnableOpacSearchHistory
272
        EnableOpacSearchHistory
274
        OPACPrivacy
273
        OPACPrivacy
(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 204-210 sub XSLTParse4Display { Link Here
204
                              UseAuthoritiesForTracings TraceSubjectSubdivisions
204
                              UseAuthoritiesForTracings TraceSubjectSubdivisions
205
                              Display856uAsImage OPACDisplay856uAsImage 
205
                              Display856uAsImage OPACDisplay856uAsImage 
206
                              UseControlNumber IntranetBiblioDefaultView BiblioDefaultView
206
                              UseControlNumber IntranetBiblioDefaultView BiblioDefaultView
207
                              singleBranchMode OPACItemLocation DisplayIconsXSLT
207
                              OPACItemLocation DisplayIconsXSLT
208
                              AlternateHoldingsField AlternateHoldingsSeparator
208
                              AlternateHoldingsField AlternateHoldingsSeparator
209
                              TrackClicks opacthemes IdRef / )
209
                              TrackClicks opacthemes IdRef / )
210
    {
210
    {
(-)a/installer/data/mysql/sysprefs.sql (-1 lines)
Lines 423-429 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
423
('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'),
423
('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'),
424
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
424
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
425
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),
425
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),
426
('singleBranchMode','0',NULL,'Operate in Single-branch mode, hide branch selection in the OPAC','YesNo'),
427
('SlipCSS','',NULL,'Slips CSS url.','free'),
426
('SlipCSS','',NULL,'Slips CSS url.','free'),
428
('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'),
427
('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'),
429
('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'),
428
('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-7 lines)
Lines 485-497 OPAC: Link Here
485
            - the acquisition details on OPAC detail pages.
485
            - the acquisition details on OPAC detail pages.
486
    Policy:
486
    Policy:
487
        -
487
        -
488
            - pref: singleBranchMode
489
              default: 0
490
              choices:
491
                  yes: "Don't allow"
492
                  no: Allow
493
            - patrons to select their branch on the OPAC or show branch names with callnumbers.
494
        -
495
            - pref: SearchMyLibraryFirst
488
            - pref: SearchMyLibraryFirst
496
              choices:
489
              choices:
497
                  yes: Limit
490
                  yes: Limit
(-)a/opac/opac-reserve.pl (-3 / +2 lines)
Lines 35-42 use C4::Overdues; Link Here
35
use C4::Debug;
35
use C4::Debug;
36
use Koha::DateUtils;
36
use Koha::DateUtils;
37
use Koha::Borrower::Debarments qw(IsDebarred);
37
use Koha::Borrower::Debarments qw(IsDebarred);
38
use Koha::Libraries;
38
use Date::Calc qw/Today Date_to_Days/;
39
use Date::Calc qw/Today Date_to_Days/;
39
# use Data::Dumper;
40
40
41
my $maxreserves = C4::Context->preference("maxreserves");
41
my $maxreserves = C4::Context->preference("maxreserves");
42
42
Lines 228-234 if ( $query->param('place_reserve') ) { Link Here
228
228
229
        my $canreserve = 0;
229
        my $canreserve = 0;
230
230
231
        my $singleBranchMode = C4::Context->preference("singleBranchMode");
231
        my $singleBranchMode = Koha::Libraries->search->count == 1;
232
        if ( $singleBranchMode || !$OPACChooseBranch )
232
        if ( $singleBranchMode || !$OPACChooseBranch )
233
        {    # single branch mode or disabled user choosing
233
        {    # single branch mode or disabled user choosing
234
            $branch = $borr->{'branchcode'};
234
            $branch = $borr->{'branchcode'};
235
- 

Return to bug 4941