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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (+22 lines)
Lines 1649-1654 div { Link Here
1649
}
1649
}
1650
1650
1651
/* nav */
1651
/* nav */
1652
1653
nav {
1654
    &.libraries {
1655
        li {
1656
            list-style-type: none;
1657
            padding: .3em .5em;
1658
1659
            a {
1660
                display: block;
1661
            }
1662
        }
1663
1664
        i.fa {
1665
            color:  #7cbc0f;
1666
        }
1667
1668
        .fa-li {
1669
            top:  unset;
1670
        }
1671
    }
1672
}
1673
1652
.nav_pages {
1674
.nav_pages {
1653
    border-top: 1px solid #DDD;
1675
    border-top: 1px solid #DDD;
1654
    padding: .6em;
1676
    padding: .6em;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (+1 lines)
Lines 315-320 Link Here
315
                                            <li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li>
315
                                            <li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li>
316
                                        [% END %]
316
                                        [% END %]
317
                                    [% END %]
317
                                    [% END %]
318
                                    <li><a href="/cgi-bin/koha/opac-library.pl">Libraries</a></li>
318
                                    [% Koha.Preference('OpacMoreSearches') | $raw %]
319
                                    [% Koha.Preference('OpacMoreSearches') | $raw %]
319
                                </ul>
320
                                </ul>
320
                            </div> <!-- /#moresearches -->
321
                            </div> <!-- /#moresearches -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt (+149 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE Koha %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>
6
    [% IF ( LibraryNameTitle ) %]
7
        [% LibraryNameTitle | html %]
8
    [% ELSE %]
9
        Koha online
10
    [% END %] catalog &rsaquo; Libraries
11
    [% IF ( library ) %]
12
        &rsaquo; [% library.branchname | html %]
13
    [% END %]
14
</title>
15
[% INCLUDE 'doc-head-close.inc' %]
16
[% BLOCK cssinclude %][% END %]
17
</head>
18
19
[% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %]
20
[% INCLUDE 'masthead.inc' %]
21
22
[% BLOCK library_description %]
23
    <div property="description">
24
        [% library.opac_info | $raw %]
25
    </div>
26
[% END %]
27
28
[% BLOCK library_info %]
29
    <div property="address" typeof="PostalAddress">
30
        <p>
31
            <span property="streetAddress">
32
                [% IF ( library.branchaddress1 ) %]
33
                    [% library.branchaddress1 | html %]
34
                [% END %]
35
                [% IF ( library.branchaddress2 ) %]
36
                    <br />[% library.branchaddress2 | html %]
37
                [% END %]
38
                [% IF ( library.branchaddress3 ) %]
39
                    <br />[% library.branchaddress3 | html %]
40
                [% END %]
41
            </span><br>
42
            [% IF ( library.branchcity ) %]
43
                <span property="addressLocality">[% library.branchcity | html %]</span>
44
            [% END %]
45
            [% IF ( library.branchstate ) %]
46
                <span property="addressRegion">[% library.branchstate | html %]</span>
47
            [% END %]
48
            [% IF ( library.branchzip ) %]
49
                <span property="postalCode">[% library.branchzip | html %]</span>
50
            [% END %]
51
            [% IF ( library.branchcountry ) %]
52
                <br /><span property="addressCountry">[% library.branchcountry | html %]</span>
53
            [% END %]
54
            [% IF ( library.branchphone ) %]
55
                <p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p>
56
            [% END %]
57
            [% IF ( library.branchfax ) %]
58
                <p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p>
59
            [% END %]
60
            [% IF ( library.branchemail ) %]
61
                <p>Email: <a href="mailto:[% library.branchemail | url %]" property="email">[% library.branchemail | html %]</a></p>
62
            [% END %]
63
            [% IF ( library.branchurl ) %]
64
                <p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
65
            [% END %]
66
        </p>
67
    </div> <!-- /div property=address -->
68
[% END %]
69
70
<div class="main">
71
    <ul class="breadcrumb">
72
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
73
        <li><a href="/cgi-bin/koha/opac-library.pl">Libraries</a>
74
        [% IF ( library ) %]
75
            <span class="divider">&rsaquo;</span></li>
76
            <li><a href="#">[% library.branchname | html %]</a></li>
77
        [% ELSE %]
78
            </li>
79
        [% END %]
80
    </ul>
81
82
    <div class="container-fluid">
83
        <div class="row-fluid">
84
            <div class="span12">
85
86
                [% IF ( library ) %]
87
88
                    <div id="library_info" class="maincontent" vocab="http://schema.org/" typeof="Library">
89
                        <h3 property="name">[% library.branchname | html %]</h3>
90
91
                        <div class="row-fluid">
92
                            <div class="span8">
93
                                [% PROCESS library_info %]
94
                                [% IF ( library.opac_info ) %]
95
                                    <hr />
96
                                    [% PROCESS library_description %]
97
                                [% END %]
98
                            </div>
99
                            <div class="span4">
100
                                [% IF ( libraries.count > 1 ) %]
101
                                    <nav class="libraries">
102
                                        <ul class="fa-ul">
103
                                            [% FOREACH library IN libraries %]
104
                                                [% IF ( branchcode == library.branchcode ) %]
105
                                                    <li class="current">
106
                                                        <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
107
                                                            <i class="fa fa-li fa-map-pin" aria-hidden="true"></i> [% library.branchname | html %]
108
                                                        </a>
109
                                                    </li>
110
                                                [% ELSE %]
111
                                                    <li>
112
                                                        <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
113
                                                            <i class="fa fa-li" aria-hidden="true"></i> [% library.branchname | html %]
114
                                                        </a>
115
                                                    </li>
116
                                                [% END %]
117
                                            [% END %]
118
                                        </ul>
119
                                    </nav>
120
                                [% END %]
121
                            </div>
122
                        </div>
123
                    </div> <!-- /#library_info -->
124
125
                [% ELSE %]
126
                    <h2>Libraries</h2>
127
128
                    [% FOREACH library IN libraries %]
129
                        <h3 property="name">
130
                            [% IF ( libraries.count > 1 ) %]
131
                                <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">[% library.branchname | html %]</a>
132
                            [% ELSE %]
133
                                [% library.branchname | html %]
134
                            [% END %]
135
                        </h3>
136
                        [% PROCESS library_info %]
137
                        <hr>
138
                        [% IF ( libraries.count == 1 ) %]
139
                            [% PROCESS library_description %]
140
                        [% END %]
141
                    [% END %]
142
143
                [% END %]
144
145
        </div> <!-- /.row-fluid -->
146
    </div> <!-- /.container-fluid -->
147
</div> <!-- / .main -->
148
[% INCLUDE 'opac-bottom.inc' %]
149
[% BLOCK jsinclude %][% END %]
(-)a/opac/opac-library.pl (-1 / +52 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright 2020 Athens County Public Libraries
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
21
use Modern::Perl;
22
23
use CGI qw ( -utf8 );
24
use C4::Auth;
25
use C4::Output;
26
use Koha::Libraries;
27
28
my $query = CGI->new();
29
30
my $branchcode   = $query->param('branchcode');
31
32
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
33
    {
34
        template_name   => "opac-library.tt",
35
        query           => $query,
36
        type            => "opac",
37
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
38
    }
39
);
40
41
if( $branchcode ){
42
    my $library = Koha::Libraries->find( $branchcode );
43
    $template->param( library => $library );
44
}
45
46
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchname'] }, );
47
$template->param(
48
    libraries => $libraries,
49
    branchcode => $branchcode,
50
);
51
52
output_html_with_http_headers $query, $cookie, $template->output;

Return to bug 13388