Bug 10866: Hide patron's history if intranetreadinghistory is set to not allow
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / readingrec.tt
1 [% USE KohaDates %]
2 [% USE Koha %]
3 [% USE Branches %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript" id="js">
10 //<![CDATA[
11
12  $(document).ready(function() {
13     var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
14         "sPaginationType": "four_button",
15         "aaSorting": [],
16         "aoColumnDefs": [
17             { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
18             { "sType": "title-string", "aTargets" : [ "title-string" ] }
19         ]
20     }));
21     var tabs = $("#tabs").tabs({
22         activate: function(e, ui) {
23             var active = tabs.tabs("option", "active" );
24             if ( active == 1 ) {
25                 table.fnFilter("standard_checkout", 0);
26             } else if ( active == 2 ) {
27                 table.fnFilter("onsite_checkout", 0);
28             } else { // all
29                 table.fnFilter('', 0);
30             }
31         }
32     });
33  });
34 //]]>
35 </script>
36 </head>
37 <body id="pat_readingrec" class="pat">
38 [% INCLUDE 'header.inc' %]
39 [% INCLUDE 'patron-search.inc' %]
40
41 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Circulation history for [% INCLUDE 'patron-title.inc' %]</div>
42
43 <div id="doc3" class="yui-t2">
44    
45    <div id="bd">
46         <div id="yui-main">
47         <div class="yui-b">
48 [% INCLUDE 'members-toolbar.inc' %]
49 <h1>Circulation history</h1>
50
51 [% UNLESS Koha.Preference('intranetreadinghistory') %]
52     <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
53 [% ELSIF is_anonymous %]
54     <div class="dialog alert">This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.</div>
55 [% ELSIF ( !loop_reading ) %]
56     <div class="dialog message">This patron has no circulation history.</div>
57 [% ELSE %]
58 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
59
60
61 <div id="tabs" class="toptabs">
62   [% IF Koha.Preference('OnSiteCheckouts') %]
63   <ul>
64     <li><a href="#readingrec" id="tab_all">All</a></li>
65     <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
66     <li><a href="#readingrec" id="tab_onsite_checkout">On-site checkouts</a></li>
67   </ul>
68   [% END %]
69   <div id="readingrec" style="overflow:hidden">
70     <table id="table_readingrec">
71       <thead>
72         <th style="display:none;">Type</th>
73         <th class="title-string">Date</th>
74         <th class="anti-the">Title</th>
75         <th>Author</th>
76         <th>Call no.</th>
77         <th>Barcode</th>
78         <th>Number of renewals</th>
79         <th class="title-string">Checked out on</th>
80         <th>Checked out from</th>
81         <th class="title-string">Date due</th>
82         <th class="title-string">Return date</th>
83       </thead>
84       <tbody>
85       [% FOREACH issue IN loop_reading %]
86         [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
87           <td style="display:none;">
88             [% IF issue.onsite_checkout %]
89               onsite_checkout
90             [% ELSE %]
91               standard_checkout
92             [% END %]
93           </td>
94           <td>
95             <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates with_hours => 1 %]</span>
96           </td>
97           <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
98
99           <td>[% issue.author %]</td>
100
101           <td>
102             [% IF issue.classification %]
103                 [% issue.classification %]
104             [% ELSE %]
105                 [% issue.itemcallnumber %]
106             [% END %]
107           </td>
108
109           <td>[% issue.barcode %]</td>
110           <td>[% issue.renewals %]</td>
111           <td>
112             <span title="[% issue.issuedate %]">[% issue.issuedate |$KohaDates with_hours => 1 %]</span>
113           </td>
114           <td>[% Branches.GetName( issue.branchcode ) %]</td>
115           <td>
116             [% IF issue.date_due %]
117                 <span title="[% issue.date_due %]">[% issue.date_due |$KohaDates with_hours => 1 %]</span>
118             [% ELSE %]
119                 <span title="0000-00-00"></span>
120             [% END %]
121           </td>
122           <td>
123             [% IF  issue.returndate %]
124               <span title="[% issue.returndate %]">[% issue.returndate |$KohaDates with_hours => 1 %]</span>
125             [% ELSE %]
126               <span title="Checked out"><small>Checked out</small></span>
127             [% END %]
128           </td>
129         </tr>
130       [% END %]
131       </tbody>
132     </table>
133   </div>
134 </div>
135 [% END %]
136 </div>
137 </div>
138
139 <div class="yui-b">
140 [% INCLUDE 'circ-menu.inc' %]
141 </div>
142 </div>
143 [% INCLUDE 'intranet-bottom.inc' %]