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 1654-1659 div { Link Here
1654
}
1654
}
1655
1655
1656
/* nav */
1656
/* nav */
1657
1658
nav {
1659
    &.libraries {
1660
        li {
1661
            list-style-type: none;
1662
            padding: .3em .5em;
1663
1664
            a {
1665
                display: block;
1666
            }
1667
        }
1668
1669
        i.fa {
1670
            color:  #7cbc0f;
1671
        }
1672
1673
        .fa-li {
1674
            top:  unset;
1675
        }
1676
    }
1677
}
1678
1657
.nav_pages {
1679
.nav_pages {
1658
    border-top: 1px solid #DDD;
1680
    border-top: 1px solid #DDD;
1659
    padding: .6em;
1681
    padding: .6em;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt (+140 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE Koha %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Libraries</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% BLOCK cssinclude %][% END %]
8
</head>
9
10
[% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %]
11
[% INCLUDE 'masthead.inc' %]
12
13
[% BLOCK library_description %]
14
    <div property="description">
15
        [% library.opac_info | $raw %]
16
    </div>
17
[% END %]
18
19
[% BLOCK library_info %]
20
    <div property="address" typeof="PostalAddress">
21
        <p>
22
            <span property="streetAddress">
23
                [% IF ( library.branchaddress1 ) %]
24
                    [% library.branchaddress1 | html %]
25
                [% END %]
26
                [% IF ( library.branchaddress2 ) %]
27
                    <br />[% library.branchaddress2 | html %]
28
                [% END %]
29
                [% IF ( library.branchaddress3 ) %]
30
                    <br />[% library.branchaddress3 | html %]
31
                [% END %]
32
            </span><br>
33
            [% IF ( library.branchcity ) %]
34
                <span property="addressLocality">[% library.branchcity | html %]</span>
35
            [% END %]
36
            [% IF ( library.branchstate ) %]
37
                <span property="addressRegion">[% library.branchstate | html %]</span>
38
            [% END %]
39
            [% IF ( library.branchzip ) %]
40
                <span property="postalCode">[% library.branchzip | html %]</span>
41
            [% END %]
42
            [% IF ( library.branchcountry ) %]
43
                <br /><span property="addressCountry">[% library.branchcountry | html %]</span>
44
            [% END %]
45
            [% IF ( library.branchphone ) %]
46
                <p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p>
47
            [% END %]
48
            [% IF ( library.branchfax ) %]
49
                <p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p>
50
            [% END %]
51
            [% IF ( library.branchemail ) %]
52
                <p>Email: <a href="mailto:[% library.branchemail | url %]" property="email">[% library.branchemail | html %]</a></p>
53
            [% END %]
54
            [% IF ( library.branchurl ) %]
55
                <p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
56
            [% END %]
57
        </p>
58
    </div> <!-- /div property=address -->
59
[% END %]
60
61
<div class="main">
62
    <ul class="breadcrumb">
63
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
64
        <li><a href="/cgi-bin/koha/opac-library.pl">Libraries</a>
65
        [% IF ( library ) %]
66
            <span class="divider">&rsaquo;</span></li>
67
            <li><a href="#">[% library.branchname | url %]</a></li>
68
        [% ELSE %]
69
            </li>
70
        [% END %]
71
    </ul>
72
73
    <div class="container-fluid">
74
        <div class="row-fluid">
75
            <div class="span12">
76
77
                [% IF ( library ) %]
78
79
                    <div id="library_info" class="maincontent" vocab="http://schema.org/" typeof="Library">
80
                        <h3 property="name">[% library.branchname | html %]</h3>
81
82
                        <div class="row-fluid">
83
                            <div class="span8">
84
                                [% PROCESS library_info %]
85
                                [% IF ( library.opac_info ) %]
86
                                    <hr />
87
                                    [% PROCESS library_description %]
88
                                [% END %]
89
                            </div>
90
                            <div class="span4">
91
                                [% IF ( libraries.count > 1 ) %]
92
                                    <nav class="libraries">
93
                                        <ul class="fa-ul">
94
                                            [% FOREACH library IN libraries %]
95
                                                [% IF ( branchcode == library.branchcode ) %]
96
                                                    <li class="current">
97
                                                        <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
98
                                                            <i class="fa fa-li fa-map-pin" aria-hidden="true"></i> [% library.branchname | html %]
99
                                                        </a>
100
                                                    </li>
101
                                                [% ELSE %]
102
                                                    <li>
103
                                                        <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
104
                                                            <i class="fa fa-li" aria-hidden="true"></i> [% library.branchname | html %]
105
                                                        </a>
106
                                                    </li>
107
                                                [% END %]
108
                                            [% END %]
109
                                        </ul>
110
                                    </nav>
111
                                [% END %]
112
                            </div>
113
                        </div>
114
                    </div> <!-- /#library_info -->
115
116
                [% ELSE %]
117
                    <h2>Libraries</h2>
118
119
                    [% FOREACH library IN libraries %]
120
                        <h3 property="name">
121
                            [% IF ( libraries.count > 1 ) %]
122
                                <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">[% library.branchname | html %]</a>
123
                            [% ELSE %]
124
                                [% library.branchname | html %]
125
                            [% END %]
126
                        </h3>
127
                        [% PROCESS library_info %]
128
                        <hr>
129
                        [% IF ( libraries.count == 1 ) %]
130
                            [% PROCESS library_description %]
131
                        [% END %]
132
                    [% END %]
133
134
                [% END %]
135
136
        </div> <!-- /.row-fluid -->
137
    </div> <!-- /.container-fluid -->
138
</div> <!-- / .main -->
139
[% INCLUDE 'opac-bottom.inc' %]
140
[% 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