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