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