Bug 27846: authorities, catalogue and cataloguing folders
[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 <nav 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 class='title-string'>Checkout on</th>
62             <th class='title-string'>Due date</th>
63             <th class='title-string'>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>[% IF checkout.issuedate %]
100                         <span title="[% checkout.issuedate | html %]">[% checkout.issuedate |$KohaDates  with_hours => 1 %]</span>
101                     [% ELSE %]
102                         <span title="0000-00-00"></span>
103                     [% END %]</td>
104                 <td>[% IF checkout.date_due %]
105                         <span title="[% checkout.date_due | html %]">[% checkout.date_due |$KohaDates  with_hours => 1 %]</span>
106                     [% ELSE %]
107                         <span title="0000-00-00"></span>
108                     [% END %]</td>
109                 <td>[% IF checkout.returndate %]
110                         <span title="[% checkout.returndate | html %]">[% checkout.returndate |$KohaDates  with_hours => 1 %]</span>
111                     [% ELSE %]
112                         <span title="Checked out"><small>Checked out</small></span>
113                     [% END %]</td>
114            </tr>
115         [% END %]
116         </tbody>
117                 </table>
118     [% ELSE %]
119         <div class="dialog message"><p>
120         <strong>[% biblio.title | html %][% IF biblio.author %], by [% biblio.author | html %][% END %]</strong> has never been checked out.</p></div>
121
122     [% END %]
123 </div>
124
125             </main>
126         </div> <!-- /.col-sm-10.col-sm-push-2 -->
127
128         <div class="col-sm-2 col-sm-pull-10">
129             <aside>
130                 [% INCLUDE 'biblio-view-menu.inc' %]
131             </aside>
132         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
133      </div> <!-- /.row -->
134
135 [% MACRO jsinclude BLOCK %]
136 [% INCLUDE 'datatables.inc' %]
137 [% INCLUDE 'columns_settings.inc' %]
138     <script id="js">
139         $(document).ready(function() {
140             var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
141             [% UNLESS show_patron_column %]
142             // Remove the patron column definition
143             columns_settings.splice(0,1);
144             [% END %]
145             var table = KohaTable("table_issues", {
146                 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
147                 "aaSorting": [[ 4, "desc" ]],
148                 "sPaginationType": "full_numbers"
149             }, columns_settings);
150         });
151     </script>
152 [% END %]
153
154 [% INCLUDE 'intranet-bottom.inc' %]