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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-1 / +1 lines)
Lines 427-433 Link Here
427
                    <li class="nav-item">
427
                    <li class="nav-item">
428
                        <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
428
                        <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
429
                            [% IF ( singleBranchMode || AllPublicBranches.size == 1 ) %]
429
                            [% IF ( singleBranchMode || AllPublicBranches.size == 1 ) %]
430
                                <span>Library</span>
430
                                <span>Contact</span>
431
                            [% ELSE %]
431
                            [% ELSE %]
432
                                <span>Libraries</span>
432
                                <span>Libraries</span>
433
                            [% END %]
433
                            [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt (-1 / +5 lines)
Lines 62-68 Link Here
62
    [% WRAPPER breadcrumbs %]
62
    [% WRAPPER breadcrumbs %]
63
        [% IF ( library ) %]
63
        [% IF ( library ) %]
64
            [% WRAPPER breadcrumb_item %]
64
            [% WRAPPER breadcrumb_item %]
65
                <a href="/cgi-bin/koha/opac-library.pl">Libraries</a>
65
                [% IF public_count > 1 %]
66
                    <a href="/cgi-bin/koha/opac-library.pl">Libraries</a>
67
                [% ELSE %]
68
                    <a href="/cgi-bin/koha/opac-library.pl">Contact</a>
69
                [% END %]
66
            [% END %]
70
            [% END %]
67
            [% WRAPPER breadcrumb_item bc_active= 1 %]
71
            [% WRAPPER breadcrumb_item bc_active= 1 %]
68
                [% library.branchname | html %]
72
                [% library.branchname | html %]
(-)a/opac/opac-library.pl (-5 / +5 lines)
Lines 45-60 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
45
);
45
);
46
46
47
my $library;
47
my $library;
48
if ( $template->{VARS}->{singleBranchMode} ) {
48
my $libraries = Koha::Libraries->search( { public => 1 }, { order_by => ['branchname'] } );
49
    $library = Koha::Libraries->search( { public => 1 } )->next;
49
$template->param( public_count => $libraries->count );
50
if ( $template->{VARS}->{singleBranchMode} || $libraries->count == 1 ) {
51
    $library = $libraries->next;
50
} elsif ($branchcode) {
52
} elsif ($branchcode) {
51
    $library = Koha::Libraries->search( { branchcode => $branchcode, public => 1 } )->next;
53
    $library = $libraries->search( { branchcode => $branchcode } )->next;
52
}
54
}
53
55
54
if ($library) {
56
if ($library) {
55
    $template->param( library => $library );
57
    $template->param( library => $library );
56
} else {
58
} else {
57
    my $libraries = Koha::Libraries->search( { public => 1 }, { order_by => ['branchname'] } );
58
    $template->param(
59
    $template->param(
59
        libraries  => $libraries,
60
        libraries  => $libraries,
60
        branchcode => C4::Context->userenv ? C4::Context->userenv->{branch} : q{},
61
        branchcode => C4::Context->userenv ? C4::Context->userenv->{branch} : q{},
61
- 

Return to bug 32051