bd9fb86d25da6c154a2c1a8e5ffb664f23a4eb72
[koha-equinox.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-main.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE Categories %]
6 [% USE Price %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
11 </head>
12 [% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
13 [% INCLUDE 'masthead.inc' %]
14
15 <div class="main">
16     <ul class="breadcrumb">
17         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a>
18         [% IF news_item %]
19             <span class="divider">&rsaquo;</span></li>
20             <li>[% news_item.title | html %]</li>
21         [% END %]
22         </li>
23     </ul>
24
25     [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
26         [% IF ( loggedinusername ) %]
27             <div id="loggedin" class="container-fluid">
28         [% ELSE %]
29             <div id="notloggedin" class="container-fluid">
30         [% END %]
31     [% ELSE %]
32         <div id="notloggedin" class="container-fluid">
33     [% END %]
34
35     <div class="row-fluid">
36     [% IF ( OpacNav ||  OpacNavBottom ) %]
37         <div class="span2">
38             <div id="navigation">
39                 [% INCLUDE 'navigation.inc' %]
40             </div>
41         </div>
42     [% END %]
43
44     [% IF ( OpacNav ||  OpacNavBottom  ) && (Koha.Preference( 'opacuserlogin' ) == 1 || OpacNavRight) %]
45         <div class="span7">
46     [% ELSIF (Koha.Preference( 'opacuserlogin' ) == 1 || OpacNavRight) %]
47         <div class="span9">
48     [% ELSIF ( OpacNav ||  OpacNavBottom  ) %]
49         <div class="span10">
50     [% ELSE %]
51         <div class="span12">
52     [% END %]
53
54         [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
55             [% UNLESS news_item %]
56                 <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl">
57                     <label for="news-branch">Display news for: </label>
58                     <select id="news-branch" name="branch">
59                         [% IF ( branchcode == "" ) %]
60                             <option value="" selected="selected">System-wide only</option>
61                         [% ELSE %]
62                             <option value="">System-wide only</option>
63                         [% END %]
64                         [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
65                     </select>
66                 </form>
67             [% END %]
68         [% END %]
69
70         [% IF ( koha_news ) %]
71
72             [% IF single_news_error %]
73
74                 <div class="alert alert-error">
75                     This news item does not exist.
76                 </div>
77
78             [% ELSE %]
79
80                 <div id="news" class="newscontainer">
81                     [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %]
82                     [% FOREACH koha_new IN koha_news %]
83                         <div class="newsitem">
84                             <h4 class="newsheader">
85                                 [% IF ( news_item ) %]
86                                     [% koha_new.title | html %]
87                                 [% ELSE %]
88                                     <a name="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew | uri %]">[% koha_new.title | html %]</a>
89                                 [% END %]
90                             </h4>
91                             <div class="newsbody">[% koha_new.content | $raw %]</div>
92                             <div class="newsfooter">
93                                 Published on [% koha_new.timestamp | $KohaDates with_hours = 1 %]
94                                 [% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %]
95                                     by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %]
96                                 [% END %]
97                                 [% IF ( news_item ) %]
98                                     &bull; <a href="/cgi-bin/koha/opac-main.pl">Show all news</a>
99                                 [% END %]
100                             </div>
101                         </div>
102
103                     [% END %]
104                     [% UNLESS news_item %]
105                         <div id="rssnews-container">
106                             <!-- Logged in users have a branch code or it could be explicitly set -->
107                             <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]">
108                                 <i class="fa fa-rss"></i>
109                                 [% IF Branches.all.size == 1 %]
110                                     [% IF branchcode %]
111                                         RSS feed for [% Branches.GetName( branchcode ) | html %] library news
112                                     [% ELSE %]
113                                         RSS feed for library news
114                                     [% END %]
115                                 [% ELSE %]
116                                     [% IF branchcode %]
117                                         RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news
118                                     [% ELSE %]
119                                         RSS feed for system-wide library news
120                                     [% END %]
121                                 [% END %]
122                             </a>
123                         </div>
124                     [% END %]
125                 </div>
126
127             [% END # /IF single_news_error %]
128
129         [% ELSE %] <!-- koha news -->
130             [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
131                 <div id="news" class="newscontainer">
132                     <div class="newsitem">
133                         <div class="newsbody">No news to display.</div>
134                         <div class="newsfooter"></div>
135                     </div>
136                 </div>
137             [% END %]
138
139         [% END # IF koha_news %]
140
141         [% UNLESS news_item # Don't show under single news item %]
142             [% IF ( display_daily_quote && daily_quote ) %]
143                 <div id="daily-quote">
144                     <h3>Quote of the day</h3>
145                     <div>
146                         <span id="daily-quote-text">[% daily_quote.text | html %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source | html %]</span>
147                     </div>
148                 </div>
149             [% END %]
150
151             [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock | $raw %]</div>[% END %]
152         [% END %]
153
154         </div> <!-- / .span 7/9 -->
155
156         [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %]
157             <div class="span3">
158                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
159                     [% UNLESS ( loggedinusername ) %]
160                         [% UNLESS ( casAuthentication || shibbolethAuthentication ) %]
161                             <div id="login">
162                                 <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth" autocomplete="off">
163                                     <input type="hidden" name="koha_login_context" value="opac" />
164                                     <fieldset class="brief">
165                                         <legend>Log in to your account:</legend>
166                                         <label for="userid">Login:</label><input type="text" id="userid" name="userid" />
167                                         <label for="password">Password:</label><input type="password" id="password" name="password" />
168                                         <fieldset class="action">
169                                             <input type="submit" value="Log in" class="btn" />
170                                         </fieldset>
171                                         [% IF Koha.Preference( 'OpacLoginInstructions' ) %]
172                                             <div id="nologininstructions-main" class="nologininstructions">
173                                                 [% Koha.Preference( 'OpacLoginInstructions' ) | $raw %]
174                                             </div>
175                                         [% END %]
176                                         [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
177                                             <div id="forgotpassword-main" class="forgotpassword">
178                                                 <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
179                                             </div>
180                                         [% END %]
181                                         [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]
182                                             <div id="patronregistration-main" class="patronregistration">
183                                                 <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p>
184                                             </div>
185                                         [% END %]
186                                     </fieldset>
187                                 </form>
188                             </div> <!-- /#login -->
189                         [% END # /casAuthentication %]
190                     [% ELSE %]
191                         [% IF Koha.Preference('OPACUserSummary') && dashboard_info %]
192                             <div id="user_summary">
193                                 <h3>Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</span></a></h3>
194                                 <ul id="user_summary_shortcuts">
195                                     [% IF checkouts && checkouts > 0 %]
196                                         <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts"><span class="user_checkouts_count count_label">[% checkouts | html %]</span> checkout(s)</a></li>
197                                     [% END %]
198                                     [% IF overdues && overdues > 0 %]
199                                         <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues"><span class="user_overdues_count count_label">[% overdues | html %]</span> overdue(s)</a></li>
200                                     [% END %]
201                                     [% IF holds_pending && holds_pending > 0 %]
202                                         <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds"><span class="user_holds_pending_count count_label">[% holds_pending | html %]</span> hold(s) pending</a></li>
203                                     [% END %]
204                                     [% IF holds_waiting && holds_waiting > 0 %]
205                                         <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds"><span class="user_holds_waiting_count count_label">[% holds_waiting | html %]</span> hold(s) waiting</a></li>
206                                     [% END %]
207                                     [% IF total_owing && total_owing > 0 %]
208                                         <li><a href="/cgi-bin/koha/opac-account.pl"><span class="user_fines_count count_label">[% total_owing | $Price with_symbol => 1 %]</span> due in fines and charges</a></li>
209                                     [% END %]
210                                 </ul>
211                             </div>
212                         [% END %]
213                     [% END # /loggedinusername %]
214                 [% END # /opacuserlogin %]
215                 [% IF ( OpacNavRight ) %]
216                     <div id="opacnavright">
217                         [% OpacNavRight | $raw %]
218                     </div>
219                 [% END # /OpacNavRight %]
220             </div> <!-- / .span3 -->
221         [% END # /opacuserlogin || OpacNavRight %]
222
223         </div> <!-- /.container-fluid -->
224     </div> <!-- /.row-fluid -->
225 </div> <!-- /.main -->
226
227 [% INCLUDE 'opac-bottom.inc' %]
228 [% BLOCK jsinclude %][% END %]