--- /dev/null
+[% USE raw %]
+[% USE Asset %]
+[% USE Koha %]
+[% INCLUDE 'doc-head-open.inc' %]
+<title>
+ [% IF ( LibraryNameTitle ) %]
+ [% LibraryNameTitle | html %]
+ [% ELSE %]
+ Koha online
+ [% END %] catalog › Libraries
+ [% IF ( library ) %]
+ › [% library.branchname | html %]
+ [% END %]
+</title>
+[% INCLUDE 'doc-head-close.inc' %]
+[% BLOCK cssinclude %][% END %]
+</head>
+
+[% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %]
+[% INCLUDE 'masthead.inc' %]
+
+[% BLOCK library_description %]
+ <div property="description">
+ [% library.opac_info | $raw %]
+ </div>
+[% END %]
+
+[% BLOCK library_info %]
+ <div property="address" typeof="PostalAddress">
+ <p>
+ <span property="streetAddress">
+ [% IF ( library.branchaddress1 ) %]
+ [% library.branchaddress1 | html %]
+ [% END %]
+ [% IF ( library.branchaddress2 ) %]
+ <br />[% library.branchaddress2 | html %]
+ [% END %]
+ [% IF ( library.branchaddress3 ) %]
+ <br />[% library.branchaddress3 | html %]
+ [% END %]
+ </span><br>
+ [% IF ( library.branchcity ) %]
+ <span property="addressLocality">[% library.branchcity | html %]</span>
+ [% END %]
+ [% IF ( library.branchstate ) %]
+ <span property="addressRegion">[% library.branchstate | html %]</span>
+ [% END %]
+ [% IF ( library.branchzip ) %]
+ <span property="postalCode">[% library.branchzip | html %]</span>
+ [% END %]
+ [% IF ( library.branchcountry ) %]
+ <br /><span property="addressCountry">[% library.branchcountry | html %]</span>
+ [% END %]
+ [% IF ( library.branchphone ) %]
+ <p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p>
+ [% END %]
+ [% IF ( library.branchfax ) %]
+ <p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p>
+ [% END %]
+ [% IF ( library.branchemail ) %]
+ <p>Email: <a href="mailto:[% library.branchemail | url %]" property="email">[% library.branchemail | html %]</a></p>
+ [% END %]
+ [% IF ( library.branchurl ) %]
+ <p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
+ [% END %]
+ </p>
+ </div> <!-- /div property=address -->
+[% END %]
+
+<div class="main">
+ <ul class="breadcrumb">
+ <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
+ <li><a href="/cgi-bin/koha/opac-library.pl">Libraries</a>
+ [% IF ( library ) %]
+ <span class="divider">›</span></li>
+ <li><a href="#">[% library.branchname | html %]</a></li>
+ [% ELSE %]
+ </li>
+ [% END %]
+ </ul>
+
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span12">
+
+ [% IF ( library ) %]
+
+ <div id="library_info" class="maincontent" vocab="http://schema.org/" typeof="Library">
+ <h3 property="name">[% library.branchname | html %]</h3>
+
+ <div class="row-fluid">
+ <div class="span8">
+ [% PROCESS library_info %]
+ [% IF ( library.opac_info ) %]
+ <hr />
+ [% PROCESS library_description %]
+ [% END %]
+ </div>
+ <div class="span4">
+ [% IF ( libraries.count > 1 ) %]
+ <nav class="libraries">
+ <ul class="fa-ul">
+ [% FOREACH library IN libraries %]
+ [% IF ( branchcode == library.branchcode ) %]
+ <li class="current">
+ <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
+ <i class="fa fa-li fa-map-pin" aria-hidden="true"></i> [% library.branchname | html %]
+ </a>
+ </li>
+ [% ELSE %]
+ <li>
+ <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
+ <i class="fa fa-li" aria-hidden="true"></i> [% library.branchname | html %]
+ </a>
+ </li>
+ [% END %]
+ [% END %]
+ </ul>
+ </nav>
+ [% END %]
+ </div>
+ </div>
+ </div> <!-- /#library_info -->
+
+ [% ELSE %]
+ <h2>Libraries</h2>
+
+ [% FOREACH library IN libraries %]
+ <h3 property="name">
+ [% IF ( libraries.count > 1 ) %]
+ <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">[% library.branchname | html %]</a>
+ [% ELSE %]
+ [% library.branchname | html %]
+ [% END %]
+ </h3>
+ [% PROCESS library_info %]
+ <hr>
+ [% IF ( libraries.count == 1 ) %]
+ [% PROCESS library_description %]
+ [% END %]
+ [% END %]
+
+ [% END %]
+
+ </div> <!-- /.row-fluid -->
+ </div> <!-- /.container-fluid -->
+</div> <!-- / .main -->
+[% INCLUDE 'opac-bottom.inc' %]
+[% BLOCK jsinclude %][% END %]
--- /dev/null
+#!/usr/bin/perl
+
+# Copyright 2020 Athens County Public Libraries
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
+
+
+use Modern::Perl;
+
+use CGI qw ( -utf8 );
+use C4::Auth;
+use C4::Output;
+use Koha::Libraries;
+
+my $query = CGI->new();
+
+my $branchcode = $query->param('branchcode');
+
+my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+ {
+ template_name => "opac-library.tt",
+ query => $query,
+ type => "opac",
+ authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+ }
+);
+
+if( $branchcode ){
+ my $library = Koha::Libraries->find( $branchcode );
+ $template->param( library => $library );
+}
+
+my $libraries = Koha::Libraries->search( {}, { order_by => ['branchname'] }, );
+$template->param(
+ libraries => $libraries,
+ branchcode => $branchcode,
+);
+
+output_html_with_http_headers $query, $cookie, $template->output;