Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-topissues.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE AuthorisedValues %]
4 [% USE ItemTypes %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Most popular titles</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %]
9     <style>
10         #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;};
11     </style>
12 [% END %]
13 </head>
14 [% INCLUDE 'bodytag.inc' bodyid='opac-topissues' bodyclass='scrollto' %]
15 [% INCLUDE 'masthead.inc' %]
16
17     <div class="main">
18         <ul class="breadcrumb">
19             <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
20             <li><a href="#">Most popular titles</a></li>
21         </ul>
22
23         <div class="container-fluid">
24             <div class="row-fluid">
25                 <div class="span2">
26                     <div id="usertopissues">
27                         [% INCLUDE 'opac-topissues.inc' %]
28                         [% IF ( OpacNav || OpacNavBottom ) %]
29                             [% INCLUDE 'navigation.inc' %]
30                         [% END %]
31                     </div>
32                 </div>
33                 <div class="span10">
34                     <div id="topissues" class="maincontent">
35
36                         [% IF ( results ) %]
37                             <table id="topissuest" class="table table-bordered table-striped">
38                                 <caption>
39                                     The [% limit | html %] most checked-out
40                                     [% IF selected_itemtype %]
41                                         [% ItemTypes.GetDescription(selected_itemtype) | html %]
42                                     [% END %]
43                                     [% IF ( branch ) %]
44                                     at
45                                     [% Branches.GetName( branch ) | html %]
46                                     [% END %]
47                                     [% IF ( timeLimit != 999 ) %]
48                                     in the past [% timeLimitFinite | html %] months
49                                     [% ELSE %] of all time[% END %]
50                                 </caption>
51                                 <thead>
52                                     <tr>
53                                         <th>Title</th>
54                                         <th>[% IF ( ccodesearch ) %]Collection[% ELSE %]Item type[% END %]</th>
55                                         <th>Checkouts</th>
56                                         [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<th>&nbsp;</th>[% END %]
57                                     </tr>
58                                 </thead>
59                                 <tbody>
60                                     [% FOREACH result IN results %]
61                                         <tr>
62                                             <td><a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% result.biblionumber | html %]">[% result.title | html %]</a><p>[% result.author | html %]
63                                             [% IF ( result.publishercode ) %]- [% result.publishercode | html %][% END %]
64                                             [% IF ( result.place ) %][% result.place | html %][% END %]
65                                             [% IF ( result.publicationyear ) %]
66                                                 [% result.publicationyear | html %]
67                                             [% ELSIF ( result.copyrightdate ) %]
68                                                 [% result.copyrightdate | html %]
69                                             [% END %]
70                                             [% IF ( result.pages ) %] - [% result.pages | html %][% END %]
71                                             [% IF ( result.item('size') ) %][% result.item('size') | html %][% END %]</p>
72                                             </td>
73                                             <td>
74                                               [% IF Koha.Preference('AdvancedSearchTypes') == 'ccode' %]
75                                                 <span class="tdlabel">Collection</span>
76                                                 [% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %]
77                                               [% ELSE %]
78                                                 <span class="tdlabel">Item type</span>
79                                                 [% ItemTypes.GetDescription(result.itemtype) | html %]
80                                               [% END %]
81                                             </td>
82                                             <td><span class="tdlabel">Checkouts: </span> <span title="[% result.count | html %]">[% result.count | html %]</span></td>
83                                             [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<td>[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %][% UNLESS ( result.norequests ) %]<a href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% result.biblionumber | html %]">Place hold</a>[% END %][% END %]</td>[% END %]
84                                             </tr>
85                                     [% END %]
86                                 </tbody>
87                             </table>
88                         [% ELSE %]
89                             No results, try to change filters.
90                         [% END # / IF results %]
91                     </div> <!-- / #topissues -->
92                 </div> <!-- / .span10 -->
93             </div> <!-- / .row-fluid -->
94         </div> <!-- / .container-fluid -->
95     </div> <!-- / .main -->
96
97 [% INCLUDE 'opac-bottom.inc' %]
98 [% BLOCK jsinclude %]
99 [% INCLUDE 'datatables.inc' %]
100 <script>
101 //<![CDATA[
102     $(function() {
103         $("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
104             "sorting": [ [2, "desc"], [0, "asc"] ],
105             "columnDefs": [
106               [% IF ( opacuserlogin ) %]{ "targets": [ -1 ], "sortable": false, "searchable": false }[% END %]
107             ],
108             "columns": [
109                 { "type": "anti-the" },
110                 null,
111                 { "type": "title-numeric" },
112                 [% IF ( opacuserlogin ) %]null,[% END %]
113             ]
114         }));
115     });
116 function Dopop(link) {
117     newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
118 }
119 //]]>
120 </script>
121 [% END %]