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

(-)a/C4/Auth.pm (-1 / +2 lines)
Lines 33-38 use C4::Search::History; Link Here
33
use Koha;
33
use Koha;
34
use Koha::AuthUtils qw(hash_password);
34
use Koha::AuthUtils qw(hash_password);
35
use Koha::LibraryCategories;
35
use Koha::LibraryCategories;
36
use Koha::Libraries;
36
use POSIX qw/strftime/;
37
use POSIX qw/strftime/;
37
use List::MoreUtils qw/ any /;
38
use List::MoreUtils qw/ any /;
38
use Encode qw( encode is_utf8);
39
use Encode qw( encode is_utf8);
Lines 421-427 sub get_template_and_user { Link Here
421
        hide_marc       => C4::Context->preference("hide_marc"),
422
        hide_marc       => C4::Context->preference("hide_marc"),
422
        item_level_itypes  => C4::Context->preference('item-level_itypes'),
423
        item_level_itypes  => C4::Context->preference('item-level_itypes'),
423
        patronimages       => C4::Context->preference("patronimages"),
424
        patronimages       => C4::Context->preference("patronimages"),
424
        singleBranchMode   => C4::Context->preference("singleBranchMode"),
425
        singleBranchMode   => ( Koha::Libraries->search->count == 1 ),
425
        XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
426
        XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
426
        XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
427
        XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
427
        using_https        => $using_https,
428
        using_https        => $using_https,
(-)a/C4/Koha.pm (-4 / +2 lines)
Lines 794-801 sub getFacets { Link Here
794
            }
794
            }
795
            ];
795
            ];
796
796
797
            unless ( C4::Context->preference("singleBranchMode")
797
            unless ( Koha::Libraries->search->count == 1 )
798
                || Koha::Libraries->search->count == 1 )
799
            {
798
            {
800
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
799
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
801
                if (   $DisplayLibraryFacets eq 'both'
800
                if (   $DisplayLibraryFacets eq 'both'
Lines 876-883 sub getFacets { Link Here
876
            },
875
            },
877
            ];
876
            ];
878
877
879
            unless ( C4::Context->preference("singleBranchMode")
878
            unless ( Koha::Libraries->search->count == 1 )
880
                || Koha::Libraries->search->count == 1 )
881
            {
879
            {
882
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
880
                my $DisplayLibraryFacets = C4::Context->preference('DisplayLibraryFacets');
883
                if (   $DisplayLibraryFacets eq 'both'
881
                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 267-273 sub BuildReport { Link Here
267
        OpacRenewalBranch
267
        OpacRenewalBranch
268
        OPACViewOthersSuggestions
268
        OPACViewOthersSuggestions
269
        SearchMyLibraryFirst
269
        SearchMyLibraryFirst
270
        singleBranchMode
271
        AnonSuggestions
270
        AnonSuggestions
272
        EnableOpacSearchHistory
271
        EnableOpacSearchHistory
273
        OPACPrivacy
272
        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 420-426 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
420
('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'),
420
('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'),
421
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
421
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
422
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),
422
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),
423
('singleBranchMode','0',NULL,'Operate in Single-branch mode, hide branch selection in the OPAC','YesNo'),
424
('SlipCSS','',NULL,'Slips CSS url.','free'),
423
('SlipCSS','',NULL,'Slips CSS url.','free'),
425
('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'),
424
('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'),
426
('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'),
425
('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-7 lines)
Lines 477-489 OPAC: Link Here
477
            - the acquisition details on OPAC detail pages.
477
            - the acquisition details on OPAC detail pages.
478
    Policy:
478
    Policy:
479
        -
479
        -
480
            - pref: singleBranchMode
481
              default: 0
482
              choices:
483
                  yes: "Don't allow"
484
                  no: Allow
485
            - patrons to select their branch on the OPAC or show branch names with callnumbers.
486
        -
487
            - pref: SearchMyLibraryFirst
480
            - pref: SearchMyLibraryFirst
488
              choices:
481
              choices:
489
                  yes: Limit
482
                  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