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