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