Bug 29602: Surround strings with span tag
[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 [% USE AdditionalContents %]
6 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Most popular titles &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% BLOCK cssinclude %]
12     <style>
13         #search-facets fieldset {
14             border: 0;
15             margin: 0;
16             padding: .3em;
17         }
18         #search-facets ol{
19             padding: .3em;
20         }
21         #search-facets li {
22             list-style-type: none;
23             padding: 4px 4px;
24         }
25         #search-facets label{
26             font-weight: bold;
27             display: block;
28             margin: .2em 0;
29         }
30         #search-facets fieldset.action {
31             padding-left: 4px;
32             margin: .3em;
33         }
34         #search-facets select {
35             max-width: 100%;
36         }
37     </style>
38 [% END %]
39 </head>
40 [% INCLUDE 'bodytag.inc' bodyid='opac-topissues' bodyclass='scrollto' %]
41 [% INCLUDE 'masthead.inc' %]
42
43     <div class="main">
44         <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
45             <ol class="breadcrumb">
46                 <li class="breadcrumb-item">
47                     <a href="/cgi-bin/koha/opac-main.pl">Home</a>
48                 </li>
49                 <li class="breadcrumb-item active">
50                     <a href="#" aria-current="page">Most popular titles</a>
51                 </li>
52             </ol>
53         </nav> <!-- /#breadcrumbs -->
54
55         <div class="container-fluid">
56             <div class="row">
57                 <div class="col-lg-2">
58                     <div id="usertopissues">
59                         [% INCLUDE 'opac-topissues.inc' %]
60                         [% IF ( OpacNav || OpacNavBottom ) %]
61                             [% INCLUDE 'navigation.inc' %]
62                         [% END %]
63                     </div>
64                 </div>
65                 <div class="col-10 order-first order-md-first order-lg-2">
66                     <div id="topissues" class="maincontent">
67
68                         <h1>Most popular</h1>
69
70                         [% IF ( results ) %]
71                             [% OpacAdvancedSearchTypes = Koha.Preference('OpacAdvancedSearchTypes').split('\|') %]
72                             <table id="topissuest" class="table table-bordered table-striped">
73                                 <caption>
74                                     The [% limit | html %] most checked-out
75                                     [% IF selected_itemtype %]
76                                         [% ItemTypes.GetDescription(selected_itemtype) | html %]
77                                     [% END %]
78                                     [% IF ( branch ) %]
79                                         at
80                                         [% Branches.GetName( branch ) | html %]
81                                     [% END %]
82                                     [% IF ( timeLimit != 999 ) %]
83                                         in the past [% timeLimitFinite | html %] months
84                                     [% ELSE %]
85                                          of all time
86                                      [% END %]
87                                 </caption>
88                                 <thead>
89                                     <tr>
90                                         <th class="anti-the">Title</th>
91                                         <th>Item type</th>
92                                         <th>Collection</th>
93                                         <th>Checkouts</th>
94                                         [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
95                                             <th class="NoSort">&nbsp;</th>
96                                         [% END %]
97                                     </tr>
98                                 </thead>
99                                 <tbody>
100                                     [% FOREACH result IN results %]
101                                         <tr>
102                                             <td>
103                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% result.biblionumber | html %]">[% result.title | html %]</a><p>[% result.author | html %]
104                                                     [% IF ( result.publishercode ) %]- [% result.publishercode | html %][% END %]
105                                                     [% IF ( result.place ) %][% result.place | html %][% END %]
106                                                     [% IF ( result.publicationyear ) %]
107                                                         [% result.publicationyear | html %]
108                                                     [% ELSIF ( result.copyrightdate ) %]
109                                                         [% result.copyrightdate | html %]
110                                                     [% END %]
111                                                     [% IF ( result.pages ) %] - [% result.pages | html %][% END %]
112                                                     [% IF ( result.item('size') ) %][% result.item('size') | html %][% END %]</p>
113                                             </td>
114                                             <td>
115                                                 <span class="tdlabel">Item type</span>
116                                                 [% ItemTypes.GetDescription(result.itemtype) | html %]
117                                             </td>
118                                             <td>
119                                                 <span class="tdlabel">Collection</span>
120                                                 [% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %]
121                                             </td>
122                                             <td data-order="[% result.count | html %]">
123                                                 <span class="tdlabel">Checkouts: </span>
124                                                 [% result.count | html %]
125                                             </td>
126                                             [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
127                                                 <td>
128                                                     [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
129                                                         [% UNLESS ( result.norequests ) %]
130                                                             <a class="btn btn-link btn-sm hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% result.biblionumber | uri %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
131                                                         [% END %]
132                                                     [% END %]
133                                                 </td>
134                                             [% END %]
135                                         </tr>
136                                     [% END %]
137                                 </tbody>
138                             </table>
139                         [% ELSE %]
140                             No results, try to change filters.
141                         [% END # / IF results %]
142                     </div> <!-- / #topissues -->
143                 </div> <!-- / .col-lg-10 -->
144             </div> <!-- / .row -->
145         </div> <!-- / .container-fluid -->
146     </div> <!-- / .main -->
147
148 [% INCLUDE 'opac-bottom.inc' %]
149 [% BLOCK jsinclude %]
150     [% INCLUDE 'datatables.inc' %]
151     <script>
152         $(function() {
153             $("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
154                 "sorting": [[3, "desc"]],
155                 "columnDefs": [
156                     { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
157                     { "type": "anti-the", "targets" : [ "anti-the" ] }
158                 ]
159             }));
160         });
161         function Dopop(link) {
162             newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
163         }
164     </script>
165 [% END %]