Bug 24224: Convert OpacNavBottom system preference to additional content
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-library.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% PROCESS 'display-library-address.inc' %]
5 [% USE AdditionalContents %]
6 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>
10    [% IF ( library ) %]
11         [% library.branchname | html %] &rsaquo;
12     [% END %]
13     Libraries
14     &rsaquo;
15 [% IF ( LibraryNameTitle ) %]
16         [% LibraryNameTitle | html %]
17     [% ELSE %]
18         Koha online
19     [% END %] catalog
20 </title>
21 [% INCLUDE 'doc-head-close.inc' %]
22 [% BLOCK cssinclude %]
23     <style>
24         .section_library {
25             margin-top: 1rem;
26             margin-bottom: 1rem;
27             border: 0;
28             border-bottom: 1px solid rgba(0,0,0,.1);
29         }
30     </style>
31 [% END %]
32 </head>
33
34 [% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %]
35 [% INCLUDE 'masthead.inc' %]
36
37 [% BLOCK library_description %]
38     <div property="description">
39         [% library.opac_info | $raw %]
40     </div>
41 [% END %]
42
43 [% BLOCK library_info %]
44     <div class="branchaddress" property="address" typeof="PostalAddress">
45         [% PROCESS 'display-library-address' %]
46     </div> <!-- /div property=address -->
47     [% IF ( library.branchphone ) %]
48         <p class="branchphone">Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p>
49     [% END %]
50     [% IF ( library.branchfax ) %]
51         <p class="branchfax">Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p>
52     [% END %]
53     [% IF ( library.branchurl ) %]
54         <p class="branchurl"><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
55     [% END %]
56 [% END %]
57
58 <div class="main">
59     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
60         <ol class="breadcrumb">
61             <li class="breadcrumb-item">
62                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
63             </li>
64             [% IF ( library ) %]
65                 <li class="breadcrumb-item">
66                     <a href="/cgi-bin/koha/opac-library.pl">Libraries</a>
67                 </li>
68                 <li class="breadcrumb-item active">
69                     <a href="#" aria-current="page">[% library.branchname | html %]</a>
70                 </li>
71             [% ELSE %]
72                 <li class="breadcrumb-item active">
73                     <a href="#" aria-current="page">Libraries</a>
74                 </li>
75             [% END %]
76         </ol>
77     </nav> <!-- /#breadcrumbs -->
78
79     <div class="container-fluid">
80         <div class="row">
81             [% IF ( OpacNav ||  OpacNavBottom ) %]
82                 <div class="col-lg-2">
83                     <div id="navigation">
84                         [% INCLUDE 'navigation.inc' %]
85                     </div>
86                 </div>
87                 <div class="col-10 order-first order-md-first order-lg-2">
88             [% ELSE %]
89                 <div class="col order-first order-md-first order-lg-2">
90             [% END %]
91
92                 [% IF ( library ) %]
93
94                     <div id="library_info" class="maincontent" vocab="http://schema.org/" typeof="Library">
95                         <h1 property="name">[% library.branchname | html %]</h1>
96
97                         <div class="row">
98                             <div class="col-lg-8">
99                                 [% PROCESS library_info %]
100                                 [% IF ( library.opac_info ) %]
101                                     <div class="library_description">
102                                         <hr />
103                                         [% PROCESS library_description %]
104                                     </div>
105                                 [% END %]
106                             </div>
107                             <div class="col-lg-4">
108                                 [% IF ( libraries.count > 1 ) %]
109                                     <nav class="libraries">
110                                         <ul class="fa-ul">
111                                             [% FOREACH library IN libraries %]
112                                                 [% IF ( branchcode == library.branchcode ) %]
113                                                     <li id="menu_[% library.branchcode| html %]" class="current">
114                                                         <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
115                                                             <i class="fa fa-li fa-map-pin" aria-hidden="true"></i> [% library.branchname | html %]
116                                                         </a>
117                                                     </li>
118                                                 [% ELSE %]
119                                                     <li id="menu_[% library.branchcode| html %]">
120                                                         <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">
121                                                             <i class="fa fa-li" aria-hidden="true"></i> [% library.branchname | html %]
122                                                         </a>
123                                                     </li>
124                                                 [% END %]
125                                             [% END %]
126                                         </ul>
127                                     </nav>
128                                 [% END # /IF libraries.count > 1 %]
129                             </div> <!-- /.col-lg-4 -->
130                         </div> <!-- /.row -->
131                     </div> <!-- /#library_info -->
132
133                 [% ELSE %]
134                     <div id="library_info" class="maincontent">
135                         <h1>[% IF ( singleBranchMode ) %]Library[% ELSE %]Libraries[% END %]</h1>
136
137                         [% FOREACH library IN libraries %]
138                             <div class="section_library" id="section_[% library.branchcode | html %]">
139                                 <h2 property="name">
140                                     [% IF ( libraries.count > 1 ) %]
141                                         <a href="/cgi-bin/koha/opac-library.pl?branchcode=[% library.branchcode | url %]">[% library.branchname | html %]</a>
142                                     [% ELSE %]
143                                         [% library.branchname | html %]
144                                     [% END %]
145                                 </h2>
146                                 [% PROCESS library_info %]
147                             </div>
148                             [% IF ( libraries.count == 1 ) %]
149                                 <div class="library_description">
150                                     [% PROCESS library_description %]
151                                 </div>
152                             [% END %]
153                         [% END %]
154                     </div> <!-- /#library_info -->
155                 [% END # /IF library %]
156             </div> <!-- /.col -->
157         </div> <!-- /.row -->
158     </div> <!-- /.container-fluid -->
159 </div> <!-- / .main -->
160
161 [% INCLUDE 'opac-bottom.inc' %]
162 [% BLOCK jsinclude %][% END %]