Bug 23916: (QA follow-up) Adapt all the things to the new column and accessor names
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / issuehistory.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE Branches %]
6 [% USE TablesSettings %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha &rsaquo; Catalog &rsaquo; Checkout history for [% INCLUDE 'biblio-title-head.inc' %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="catalog_issuehistory" class="catalog">
14
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'cat-search.inc' %]
17
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; [% INCLUDE 'biblio-title.inc' link = 1 %] &rsaquo; Checkout history</div>
19
20 <div class="main container-fluid">
21     <div class="row">
22         <div class="col-sm-10 col-sm-push-2">
23             <main>
24
25 <h1>Checkout history for [% INCLUDE 'biblio-title.inc' %]</h1>
26 [% IF biblio.author %]<h3>by [% biblio.author | html %]</h3>[% END %]
27
28 [% SET show_patron_column = Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %]
29
30 <div class="searchresults">
31     [% IF checkouts %]
32         <h4>Checked out [% checkouts.size | html %] times</h4>
33         <table id="table_issues">
34             <thead><tr>
35             [% IF show_patron_column %]
36             <th>Patron</th>
37             [% END %]
38             <th>Barcode</th>
39             <th>Checked out from</th>
40             [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
41             <th>Checked out by</th>
42             [% END %]
43             <th>Renewed</th>
44             <th class='title-string'>Checkout on</th>
45             <th class='title-string'>Due date</th>
46             <th class='title-string'>Checkin on</th>
47             </tr></thead>
48             <tbody>
49         [% FOREACH checkout IN checkouts %]
50             <tr>
51                 [% IF show_patron_column %]
52                     <td>
53                         [% IF checkout.patron %][%# Not set for deleted patron records %]
54                             [% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %]
55                         [% END %]
56                     </td>
57                 [% END %]
58                 <td>
59                     [% IF checkout.item.barcode %] [%# FIXME This test is not mandatory I think %]
60                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% checkout.item.biblionumber | uri %]&amp;itemnumber=[% checkout.item.itemnumber | uri %]">[% checkout.item.barcode | html %]</a>
61                     [% ELSE %]
62                         &nbsp;
63                     [% END %]</td>
64                 <td>[% IF checkout.branchcode %]
65                         [% Branches.GetName( checkout.branchcode ) | html %]
66                     [% ELSE %]
67                         &nbsp;
68                     [% END %]</td>
69                 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
70                 <td>[% IF checkout.issuer_id %]
71                     <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% checkout.issuer_id | uri %]">
72                     [% INCLUDE 'patron-title.inc' patron=checkout.issuer_id %]
73                     </a>
74                     [% END %]</td>
75                 [% END %]
76                 <td>[% IF checkout.renewals %]
77                         Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates  with_hours => 1 %]</small>
78                             [% END %]
79                     [% ELSE %]
80                         No
81                     [% END %]</td>
82                 <td>[% IF checkout.issuedate %]
83                         <span title="[% checkout.issuedate | html %]">[% checkout.issuedate |$KohaDates  with_hours => 1 %]</span>
84                     [% ELSE %]
85                         <span title="0000-00-00"></span>
86                     [% END %]</td>
87                 <td>[% IF checkout.date_due %]
88                         <span title="[% checkout.date_due | html %]">[% checkout.date_due |$KohaDates  with_hours => 1 %]</span>
89                     [% ELSE %]
90                         <span title="0000-00-00"></span>
91                     [% END %]</td>
92                 <td>[% IF checkout.returndate %]
93                         <span title="[% checkout.returndate | html %]">[% checkout.returndate |$KohaDates  with_hours => 1 %]</span>
94                     [% ELSE %]
95                         <span title="Checked out"><small>Checked out</small></span>
96                     [% END %]</td>
97            </tr>
98         [% END %]
99         </tbody>
100                 </table>
101     [% ELSE %]
102         <div class="dialog message"><p>
103         <strong>[% biblio.title | html %][% IF biblio.author %], by [% biblio.author | html %][% END %]</strong> has never been checked out.</p></div>
104
105     [% END %]
106 </div>
107
108             </main>
109         </div> <!-- /.col-sm-10.col-sm-push-2 -->
110
111         <div class="col-sm-2 col-sm-pull-10">
112             <aside>
113                 [% INCLUDE 'biblio-view-menu.inc' %]
114             </aside>
115         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
116      </div> <!-- /.row -->
117
118 [% MACRO jsinclude BLOCK %]
119 [% INCLUDE 'datatables.inc' %]
120 [% INCLUDE 'columns_settings.inc' %]
121     <script id="js">
122         $(document).ready(function() {
123             var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
124             [% UNLESS show_patron_column %]
125             // Remove the patron column definition
126             columns_settings.splice(0,1);
127             [% END %]
128             var table = KohaTable("table_issues", {
129                 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
130                 "aaSorting": [[ 4, "desc" ]],
131                 "sPaginationType": "full_numbers"
132             }, columns_settings);
133         });
134     </script>
135 [% END %]
136
137 [% INCLUDE 'intranet-bottom.inc' %]