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