Bug 21526: Use the 'url' filter when needed
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-main.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE Branches %]
4 [% USE Price %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
11 [% INCLUDE 'masthead.inc' %]
12
13 <div class="main">
14     <ul class="breadcrumb">
15         <li><a href="#">Home</a></li>
16     </ul>
17
18     [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
19         [% IF ( loggedinusername ) %]
20             <div id="loggedin" class="container-fluid">
21         [% ELSE %]
22             <div id="notloggedin" class="container-fluid">
23         [% END %]
24     [% ELSE %]
25         <div id="notloggedin" class="container-fluid">
26     [% END %]
27
28     <div class="row-fluid">
29     [% IF ( OpacNav ||  OpacNavBottom ) %]
30         <div class="span2">
31             <div id="navigation">
32                 [% INCLUDE 'navigation.inc' %]
33             </div>
34         </div>
35     [% END %]
36
37     [% IF ( OpacNav ||  OpacNavBottom  ) && (Koha.Preference( 'opacuserlogin' ) == 1 || OpacNavRight) %]
38         <div class="span7">
39     [% ELSIF (Koha.Preference( 'opacuserlogin' ) == 1 || OpacNavRight) %]
40         <div class="span9">
41     [% ELSIF ( OpacNav ||  OpacNavBottom  ) %]
42         <div class="span10">
43     [% ELSE %]
44         <div class="span12">
45     [% END %]
46             [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
47                 <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl">
48                 <label for="news-branch">Display news for: </label>
49                 <select id="news-branch" name="branch">
50                 [% IF ( branchcode == "" ) %]
51                 <option value="" selected="selected">system-wide only</option>
52                 [% ELSE %]
53                 <option value=""         >system-wide only</option>
54                 [% END %]
55                 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
56                 </select>
57                 </form>
58             [% END %]
59
60         [% IF ( koha_news_count ) %]
61
62             <div id="news" class="newscontainer">
63                 [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %]
64                 [% FOREACH koha_new IN koha_news %]
65                     <div class="newsitem">
66                         <a name="newsitem[% koha_new.idnew | html %]"></a><h4 class="newsheader">[% koha_new.title | html %]</h4>
67                         <div class="newsbody">[% koha_new.content | $raw %]</div>
68                         <div class="newsfooter">(published on [% koha_new.newdate | html %][% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %][% END %])</div>
69                     </div>
70                 [% END %]
71             </div>
72             <div id="rssnews-container">
73                 <!-- Logged in users have a branch code or it could be explicitly set -->
74                 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png"></a>
75                 [% IF Branches.all.size == 1 %]
76                     [% IF branchcode %]
77                         RSS feed for [% Branches.GetName( branchcode ) | html %] library news.
78                     [% ELSE %]
79                         RSS feed for library news.
80                     [% END %]
81                 [% ELSE %]
82                     [% IF branchcode %]
83                         RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news.
84                     [% ELSE %]
85                         RSS feed for system-wide library news.
86                     [% END %]
87                 [% END %]
88             </div>
89             [% ELSE %]
90                 [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
91                     <div id="news" class="newscontainer">
92                         <div class="newsitem">
93                             <div class="newsbody">No news to display.</div>
94                             <div class="newsfooter"></div>
95                         </div>
96                     </div>
97                 [% END %]
98             [% END %]
99
100         [% IF ( display_daily_quote && daily_quote ) %]
101             <div id="daily-quote">
102                 <h3>Quote of the day</h3>
103                 <div>
104                     <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>
105                 </div>
106             </div>
107         [% END %]
108
109         [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock | $raw %]</div>[% END %]
110         </div> <!-- / .span 7/9 -->
111
112         [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %]
113             <div class="span3">
114                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
115                     [% UNLESS ( loggedinusername ) %]
116                         [% UNLESS ( casAuthentication || shibbolethAuthentication ) %]
117                             <div id="login">
118                                 <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth" autocomplete="off">
119                                     <input type="hidden" name="koha_login_context" value="opac" />
120                                     <fieldset class="brief">
121                                         <legend>Log in to your account:</legend>
122                                         <label for="userid">Login:</label><input type="text" id="userid" name="userid" />
123                                         <label for="password">Password:</label><input type="password" id="password" name="password" />
124                                         <fieldset class="action">
125                                             <input type="submit" value="Log in" class="btn" />
126                                         </fieldset>
127                                         [% IF Koha.Preference( 'OpacLoginInstructions' ) %]
128                                             <div id="nologininstructions-main" class="nologininstructions">
129                                                 [% Koha.Preference( 'OpacLoginInstructions' ) | $raw %]
130                                             </div>
131                                         [% END %]
132                                         [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
133                                             <div id="forgotpassword-main" class="forgotpassword">
134                                                 <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
135                                             </div>
136                                         [% END %]
137                                         [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]
138                                             <div id="patronregistration-main" class="patronregistration">
139                                                 <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p>
140                                             </div>
141                                         [% END %]
142                                     </fieldset>
143                                 </form>
144                             </div> <!-- /#login -->
145                         [% END # /casAuthentication %]
146                     [% ELSE %]
147                         [% IF Koha.Preference('OPACUserSummary') && dashboard_info %]
148                             <div id="user_summary">
149                                 <h3>Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</span></a></h3>
150                                 <ul id="user_summary_shortcuts">
151                                     [% IF checkouts && checkouts > 0 %]
152                                         <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>
153                                     [% END %]
154                                     [% IF overdues && overdues > 0 %]
155                                         <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>
156                                     [% END %]
157                                     [% IF holds_pending && holds_pending > 0 %]
158                                         <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>
159                                     [% END %]
160                                     [% IF holds_waiting && holds_waiting > 0 %]
161                                         <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>
162                                     [% END %]
163                                     [% IF total_owing && total_owing > 0 %]
164                                         <li><a href="/cgi-bin/koha/opac-account.pl"><span class="user_fines_count count_label">[% total_owing | $Price with_symbol => 1 | html %]</span> due in fines and charges</a></li>
165                                     [% END %]
166                                 </ul>
167                             </div>
168                         [% END %]
169                     [% END # /loggedinusername %]
170                 [% END # /opacuserlogin %]
171                 [% IF ( OpacNavRight ) %]
172                     <div id="opacnavright">
173                         [% OpacNavRight | $raw %]
174                     </div>
175                 [% END # /OpacNavRight %]
176             </div> <!-- / .span3 -->
177         [% END # /opacuserlogin || OpacNavRight %]
178
179         </div> <!-- /.container-fluid -->
180     </div> <!-- /.row-fluid -->
181 </div> <!-- /.main -->
182
183 [% INCLUDE 'opac-bottom.inc' %]
184 [% BLOCK jsinclude %][% END %]