Bug 20934: (QA follow-up) Fix showing number of records in checkout history
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / issuehistory.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Catalog &rsaquo; Checkout history for [% biblio.title |html %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") %]
10 </head>
11
12 <body id="catalog_issuehistory" class="catalog">
13
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
16
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Checkout history for <i>[% biblio.title |html %]</i></div>
18
19 <div id="doc3" class="yui-t2">
20
21    <div id="bd">
22         <div id="yui-main">
23         <div class="yui-b">
24
25 <h1>Checkout history for [% biblio.title |html %]</h1>
26 [% IF biblio.author %]<h3>by [% biblio.author %]</h3>[% END %]
27
28 <div class="searchresults">
29     [% IF checkouts %]
30         <h4>Checked out [% checkouts.size %] times</h4>
31         <table id="table_issues">
32             <thead><tr>
33             [% IF Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %]
34             <th>Patron</th>
35             [% END %]
36             <th>Barcode</th>
37             <th>Checked out from</th>
38             <th>Renewed</th>
39             <th class='title-string'>Checkout on</th>
40             <th class='title-string'>Due date</th>
41             <th class='title-string'>Checkin on</th>
42             </tr></thead>
43             <tbody>
44         [% FOREACH checkout IN checkouts %]
45             <tr>
46                 [% IF Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %]
47                 <td>[% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %]</td>
48                 [% END %]
49                 <td>
50                     [% IF checkout.item.barcode %] [%# FIXME This test is not mandatory I think %]
51                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% checkout.item.biblionumber %]&amp;itemnumber=[% checkout.item.itemnumber %]">[% checkout.item.barcode %]</a>
52                     [% ELSE %]
53                         &nbsp;
54                     [% END %]</td>
55                 <td>[% IF checkout.branchcode %]
56                         [% Branches.GetName( checkout.branchcode ) %]
57                     [% ELSE %]
58                         &nbsp;
59                     [% END %]</td>
60                 <td>[% IF checkout.renewals %]
61                         Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1  %]</small>
62                             [% END %]
63                     [% ELSE %]
64                         No
65                     [% END %]</td>
66                 <td>[% IF checkout.issuedate %]
67                         <span title="[% checkout.issuedate %]">[% checkout.issuedate |$KohaDates with_hours => 1  %]</span>
68                     [% ELSE %]
69                         <span title="0000-00-00"></span>
70                     [% END %]</td>
71                 <td>[% IF checkout.date_due %]
72                         <span title="[% checkout.date_due %]">[% checkout.date_due |$KohaDates with_hours => 1  %]</span>
73                     [% ELSE %]
74                         <span title="0000-00-00"></span>
75                     [% END %]</td>
76                 <td>[% IF checkout.returndate %]
77                         <span title="[% checkout.returndate %]">[% checkout.returndate |$KohaDates with_hours => 1  %]</span>
78                     [% ELSE %]
79                         <span title="Checked out"><small>Checked out</small></span>
80                     [% END %]</td>
81            </tr>
82         [% END %]
83         </tbody>
84                 </table>
85     [% ELSE %]
86         <div class="dialog message"><p>
87         <b>[% biblio.title |html %][% IF biblio.author %], by [% biblio.author %][% END %]</b> has never been checked out.</p></div>
88
89     [% END %]
90 </div>
91
92 </div>
93 </div>
94 <div class="yui-b">
95 [% INCLUDE 'biblio-view-menu.inc' %]
96 </div>
97 </div>
98
99 [% MACRO jsinclude BLOCK %]
100 [% INCLUDE 'datatables.inc' %]
101     <script type="text/javascript" id="js">
102         $(document).ready(function() {
103             $("#table_issues").dataTable($.extend(true, {}, dataTablesDefaults, {
104                 "aoColumnDefs": [
105                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
106                 ],
107                 "aaSorting": [[ 4, "desc" ]],
108                 "sPaginationType": "full_numbers"
109             }));
110         });
111     </script>
112 [% END %]
113
114 [% INCLUDE 'intranet-bottom.inc' %]