Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-topissues.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Most popular titles
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% BLOCK cssinclude %]
5     <style type="text/css">
6         #search-facets fieldset { border: 0; margin: 0;padding:.3em;}#search-facets ol{padding:.3em;}#search-facets li {list-style-type:none;padding:4px 4px;}#search-facets label{font-weight:bold;display:block;margin:.2em 0;}#search-facets fieldset.action {padding-left:4px;margin:.3em;};
7     </style>
8 [% END %]
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-topissues' bodyclass='scrollto' %]
11 [% INCLUDE 'masthead.inc' %]
12
13     <div class="main">
14         <ul class="breadcrumb">
15             <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
16             <li><a href="#">Most popular titles</a></li>
17         </ul>
18
19         <div class="container-fluid">
20             <div class="row-fluid">
21                 <div class="span2">
22                     [% IF ( results_loop ) %]
23                         <div id="usertopissues">
24                             [% INCLUDE 'opac-topissues.inc' %]
25                             [% IF ( OpacNav || OpacNavBottom ) %]
26                                 [% INCLUDE 'navigation.inc' %]
27                             [% END %]
28                         </div>
29                     [% ELSE %]
30                         [% IF ( OpacNav || OpacNavBottom ) %]
31                             <div id="leftmenus">
32                                 [% INCLUDE 'navigation.inc' %]
33                             </div>
34                         [% END %]
35                     [% END %]
36                 </div>
37                 <div class="span10">
38                     <div id="topissues" class="maincontent">
39
40                         [% IF ( results_loop ) %]
41                             <table id="topissuest" class="table table-bordered table-striped">
42                                 <caption>
43                                     The [% limit %] most checked-out
44                                     [% IF ( itemtype ) %]
45                                         [% itemtype %]
46                                     [% END %]
47                                     [% IF ( branch ) %]
48                                     at
49                                     [% branch %]
50                                     [% END %]
51                                     [% IF ( timeLimitFinite ) %]
52                                     in the past [% timeLimitFinite %] months
53                                     [% ELSE %] of all time[% END %]
54                                 </caption>
55                                 <thead>
56                                     <tr>
57                                         <th>Title</th>
58                                         <th>[% IF ( ccodesearch ) %]Collection[% ELSE %]Item type[% END %]</th>
59                                         <th>Checkouts</th>
60                                         [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<th>&nbsp;</th>[% END %]
61                                     </tr>
62                                 </thead>
63                                 <tbody>
64                                     [% FOREACH results_loo IN results_loop %]
65                                         <tr>
66                                             <td><a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% results_loo.biblionumber %]">[% results_loo.title |html %]</a><p>[% results_loo.author %]
67                                             [% IF ( results_loo.publishercode ) %]- [% results_loo.publishercode %][% END %] [% IF ( results_loo.seriestitle ) %]([% results_loo.seriestitle %])[% END %]
68                                             [% IF ( results_loo.place ) %][% results_loo.place %][% END %]
69                                             [% IF ( results_loo.publicationyear ) %]
70                                                 [% results_loo.publicationyear %]
71                                             [% ELSIF ( results_loo.copyrightdate ) %]
72                                                 [% results_loo.copyrightdate %]
73                                             [% END %]
74                                             [% IF ( results_loo.pages ) %] - [% results_loo.pages %][% END %]
75                                             [% IF ( results_loo.size ) %][% results_loo.size %][% END %]</p>
76                                             </td>
77                                             <td>
78                                                 [% IF ( results_loo.description ) %]
79                                                     <span class="tdlabel">
80                                                         [% IF ( ccodesearch ) %]
81                                                             Collection
82                                                         [% ELSE %]
83                                                             Item type
84                                                         [% END %]:
85                                                     </span>
86                                                     [% results_loo.description %]
87                                                 [% END %]
88                                             </td>
89                                             <td><span class="tdlabel">Checkouts: </span> [% results_loo.tot %]</td>
90                                             [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<td>[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %][% UNLESS ( results_loo.norequests ) %]<a href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% results_loo.biblionumber %]">Place hold</a>[% END %][% END %]</td>[% END %]
91                                             </tr>
92                                     [% END %]
93                                 </tbody>
94                             </table>
95                         [% ELSE %]
96                             <form method="post" action="/cgi-bin/koha/opac-topissues.pl">
97                                 <fieldset class="rows">
98                                 <legend>See the most popular titles</legend>
99                                     <ol>
100                                         <li><label for="limit">Show the top </label> <select name="limit" id="limit">
101                                                     [% IF ( limit == 10 ) %]<option value ="10" selected="selected">10 titles</option>[% ELSE %]<option value="10">10 titles</option>[% END %]
102                                                     [% IF ( limit == 15 ) %]<option value ="15" selected="selected">15 titles</option>[% ELSE %]<option value="15">15 titles</option>[% END %]
103                                                     [% IF ( limit == 20 ) %]<option value ="20" selected="selected">20 titles</option>[% ELSE %]<option value="20">20 titles</option>[% END %]
104                                                     [% IF ( limit == 30 ) %]<option value ="30" selected="selected">30 titles</option>[% ELSE %]<option value="30">30 titles</option>[% END %]
105                                                     [% IF ( limit == 40 ) %]<option value ="40" selected="selected">40 titles</option>[% ELSE %]<option value="40">40 titles</option>[% END %]
106                                                     [% IF ( limit == 50 ) %]<option value ="50" selected="selected">50 titles</option>[% ELSE %]<option value="50">50 titles</option>[% END %]
107                                                     [% IF ( limit == 100 ) %]<option value ="100" selected="selected">100 titles</option>[% ELSE %]<option value="100">100 titles</option>[% END %]
108                                                 </select>
109                                         </li>
110                                         <li>
111                                             <label for="branch">From: </label>
112                                             <select name="branch" id="branch">
113                                             <option value="">All libraries</option>
114                                             [% FOREACH branchloo IN branchloop %]
115                                                 [% IF ( branchloo.selected ) %]
116                                                     <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
117                                                 [% ELSE %]
118                                                     <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
119                                                 [% END %]
120                                             [% END %]
121                                             </select>
122                                         </li>
123                                         <li>
124                                             <label for="itemtype">Limit to: </label>
125                                             <select name="itemtype" id="itemtype">
126                                                 [% IF ( ccodesearch ) %]
127                                                     <option value="">All collections</option>
128                                                 [% ELSE %]
129                                                     <option value="">All item types</option>
130                                                 [% END %]
131                                                 [% FOREACH itemtypeloo IN itemtypeloop %]
132                                                     [% IF ( itemtypeloo.selected ) %]<option value="[% itemtypeloo.value %]" selected="selected">[% ELSE %]<option value="[% itemtypeloo.value %]">[% END %]
133                                                         [% itemtypeloo.description %]
134                                                     </option>
135                                                 [% END %]
136                                             </select>
137                                         </li>
138                                         <li>
139                                             <label for="timeLimit">of the last:</label>
140                                             <select name="timeLimit" id="timeLimit">
141                                                 [% IF ( timeLimit == 3 ) %]<option value="3" selected="selected">3 months</option>[% ELSE %]<option value="3">3 months</option>[% END %]
142                                                  [% IF ( timeLimit == 6 ) %]<option value="6" selected="selected">6 months</option>[% ELSE %]<option value="6">6 months</option>[% END %]
143                                                  [% IF ( timeLimit == 12 ) %]<option value="12" selected="selected">12 months</option>[% ELSE %]<option value="12">12 months</option>[% END %]
144                                                  [% IF ( timeLimit == 999 ) %]<option value="999" selected="selected">No limit</option>[% ELSE %]<option value="999">No limit</option>[% END %]
145                                             </select>
146                                         </li>
147                                     </ol>
148                                     <input type="hidden" name="do_it" value="1" />
149                                 </fieldset>
150                                 <fieldset class="action">
151                                     <input type="submit" class="btn" value="Submit" />
152                                 </fieldset>
153                             </form>
154                        [% END # / IF results_loop %]
155                     </div> <!-- / #topissues -->
156                 </div> <!-- / .span10 -->
157             </div> <!-- / .row-fluid -->
158         </div> <!-- / .container-fluid -->
159     </div> <!-- / .main -->
160
161 [% INCLUDE 'opac-bottom.inc' %]
162 [% BLOCK jsinclude %]
163 [% INCLUDE 'datatables.inc' %]
164 <script type="text/javascript">
165 //<![CDATA[
166     $(function() {
167         $("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
168             "aaSorting": [ [2, "desc"], [0, "asc"] ],
169             "aoColumnDefs": [
170               [% IF ( opacuserlogin ) %]{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }[% END %]
171             ],
172             "aoColumns": [
173                 { "sType": "anti-the" },
174                 null,
175                 null,
176                 [% IF ( opacuserlogin ) %]null,[% END %]
177             ]
178         }));
179     });
180 function Dopop(link) {
181     newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
182 }
183 //]]>
184 </script>
185 [% END %]