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