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