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