Bug 10309 - New OPAC theme based on Bootstrap
[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 <body id="opac-topissues" class="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.publicationyear ) %] - [% results_loo.publicationyear %][% END %]
68                                             [% IF ( results_loo.publishercode ) %]- [% results_loo.publishercode %][% END %] [% IF ( results_loo.seriestitle ) %]([% results_loo.seriestitle %])[% END %]
69                                             [% IF ( results_loo.place ) %] ; [% results_loo.place %][% END %]
70                                             [% IF ( results_loo.pages ) %] - [% results_loo.pages %][% END %]
71                                             [% IF ( results_loo.size ) %] ; [% results_loo.size %][% END %]</p>
72                                             </td>
73                                             <td>
74                                                 [% IF ( results_loo.description ) %]
75                                                     <span class="tdlabel">
76                                                         [% IF ( ccodesearch ) %]
77                                                             Collection
78                                                         [% ELSE %]
79                                                             Item type
80                                                         [% END %]:
81                                                     </span>
82                                                     [% results_loo.description %]
83                                                 [% END %]
84                                             </td>
85                                             <td><span class="tdlabel">Checkouts: </span> [% results_loo.tot %]</td>
86                                             [% 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 %]
87                                             </tr>
88                                     [% END %]
89                                 </tbody>
90                             </table>
91                         [% ELSE %]
92                             <form method="post" action="/cgi-bin/koha/opac-topissues.pl">
93                                 <fieldset class="rows">
94                                 <legend>See the most popular titles</legend>
95                                     <ol>
96                                         <li><label for="limit">Show the top </label> <select name="limit" id="limit">
97                                                     [% IF ( limit == 10 ) %]<option value ="10" selected="selected">10 titles</option>[% ELSE %]<option value="10">10 titles</option>[% END %]
98                                                     [% IF ( limit == 15 ) %]<option value ="15" selected="selected">15 titles</option>[% ELSE %]<option value="15">15 titles</option>[% END %]
99                                                     [% IF ( limit == 20 ) %]<option value ="20" selected="selected">20 titles</option>[% ELSE %]<option value="20">20 titles</option>[% END %]
100                                                     [% IF ( limit == 30 ) %]<option value ="30" selected="selected">30 titles</option>[% ELSE %]<option value="30">30 titles</option>[% END %]
101                                                     [% IF ( limit == 40 ) %]<option value ="40" selected="selected">40 titles</option>[% ELSE %]<option value="40">40 titles</option>[% END %]
102                                                     [% IF ( limit == 50 ) %]<option value ="50" selected="selected">50 titles</option>[% ELSE %]<option value="50">50 titles</option>[% END %]
103                                                     [% IF ( limit == 100 ) %]<option value ="100" selected="selected">100 titles</option>[% ELSE %]<option value="100">100 titles</option>[% END %]
104                                                 </select>
105                                         </li>
106                                         <li>
107                                             <label for="branch">From: </label>
108                                             <select name="branch" id="branch">
109                                             <option value="">All libraries</option>
110                                             [% FOREACH branchloo IN branchloop %]
111                                                 [% IF ( branchloo.selected ) %]
112                                                     <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
113                                                 [% ELSE %]
114                                                     <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
115                                                 [% END %]
116                                             [% END %]
117                                             </select>
118                                         </li>
119                                         <li>
120                                             <label for="itemtype">Limit to: </label>
121                                             <select name="itemtype" id="itemtype">
122                                                 [% IF ( ccodesearch ) %]
123                                                     <option value="">All collections</option>
124                                                 [% ELSE %]
125                                                     <option value="">All item types</option>
126                                                 [% END %]
127                                                 [% FOREACH itemtypeloo IN itemtypeloop %]
128                                                     [% IF ( itemtypeloo.selected ) %]<option value="[% itemtypeloo.value %]" selected="selected">[% ELSE %]<option value="[% itemtypeloo.value %]">[% END %]
129                                                         [% itemtypeloo.description %]
130                                                     </option>
131                                                 [% END %]
132                                             </select>
133                                         </li>
134                                         <li>
135                                             <label for="timeLimit">of the last:</label>
136                                             <select name="timeLimit" id="timeLimit">
137                                                 [% IF ( timeLimit == 3 ) %]<option value="3" selected="selected">3 months</option>[% ELSE %]<option value="3">3 months</option>[% END %]
138                                                  [% IF ( timeLimit == 6 ) %]<option value="6" selected="selected">6 months</option>[% ELSE %]<option value="6">6 months</option>[% END %]
139                                                  [% IF ( timeLimit == 12 ) %]<option value="12" selected="selected">12 months</option>[% ELSE %]<option value="12">12 months</option>[% END %]
140                                                  [% IF ( timeLimit == 999 ) %]<option value="999" selected="selected">No limit</option>[% ELSE %]<option value="999">No limit</option>[% END %]
141                                             </select>
142                                         </li>
143                                     </ol>
144                                     <input type="hidden" name="do_it" value="1" />
145                                 </fieldset>
146                                 <fieldset class="action">
147                                     <input type="submit" class="btn" value="Submit" />
148                                 </fieldset>
149                             </form>
150                        [% END # / IF results_loop %]
151                     </div> <!-- / #topissues -->
152                 </div> <!-- / .span10 -->
153             </div> <!-- / .row-fluid -->
154         </div> <!-- / .container-fluid -->
155     </div> <!-- / .main -->
156
157 [% INCLUDE 'opac-bottom.inc' %]
158 [% BLOCK jsinclude %]
159 [% INCLUDE 'datatables.inc' %]
160 <script type="text/javascript">
161 //<![CDATA[
162     $(function() {
163         $("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
164             "aaSorting": [ [2, "desc"], [0, "asc"] ],
165             "aoColumnDefs": [
166               [% IF ( opacuserlogin ) %]{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }[% END %]
167             ],
168             "aoColumns": [
169                 { "sType": "anti-the" },
170                 null,
171                 null,
172                 [% IF ( opacuserlogin ) %]null,[% END %]
173             ]
174         }));
175     });
176 function Dopop(link) {
177     newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
178 }
179 //]]>
180 </script>
181 [% END %]