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