5 [% USE AuthorisedValues %]
7 [% USE TablesSettings %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Circulation history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
14 <body id="pat_readingrec" class="pat">
15 [% WRAPPER 'header.inc' %]
16 [% INCLUDE 'patron-search-header.inc' %]
19 [% WRAPPER 'sub-header.inc' %]
20 [% WRAPPER breadcrumbs %]
21 [% WRAPPER breadcrumb_item %]
22 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
24 [% WRAPPER breadcrumb_item %]
25 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
27 [% WRAPPER breadcrumb_item bc_active= 1 %]
28 <span>Circulation history</span>
30 [% END #/ WRAPPER breadcrumbs %]
31 [% END #/ WRAPPER sub-header.inc %]
33 <div class="main container-fluid">
35 <div class="col-sm-10 col-sm-push-2">
38 [% INCLUDE 'members-toolbar.inc' %]
39 <h1>Circulation history</h1>
41 [% UNLESS Koha.Preference('intranetreadinghistory') %]
42 <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
43 [% ELSIF is_anonymous %]
44 <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>
45 [% ELSIF ( patron.privacy == 2) %]
46 <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
47 [% ELSIF ( !loop_reading ) %]
48 <div class="dialog message">This patron has no circulation history.</div>
50 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
52 [% BLOCK table_readingrec %]
53 <table id="table_readingrec">
56 <th style="display:none;">Type</th>
58 <th class="anti-the">Title</th>
63 <th>Number of renewals</th>
64 <th>Checked out on</th>
65 <th>Checked out from</th>
66 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
67 <th>Checked out by</th>
74 [% FOREACH issue IN loop_reading %]
75 [% IF issue.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %]
76 <td style="display:none;">
77 [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
78 [% ELSE %][% issuetype = 'standard_checkout' | html %]
80 [% issuetype | html %]
82 <td data-order="[% issue.issuestimestamp | html %]">
83 [% issue.issuestimestamp | $KohaDates with_hours => 1 %]
86 [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
89 <td>[% issue.author | html %]</td>
92 [% IF issue.classification %]
93 [% issue.classification | html %]
95 [% issue.itemcallnumber | html %]
100 [% IF issue.enumchron %]
101 [% issue.enumchron | html %]
105 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% issue.itemnumber | uri %]&biblionumber=[% issue.biblionumber | uri %]&bi=[% issue.biblioitemnumber | uri %]#item[% issue.itemnumber | uri %]">[% issue.barcode | html %]</a></td>
107 [% issue.renewals_count | html %]
108 [% IF issue.renewals_count > 0 %]
109 [ <a class="checkout_renewals_view" data-renewals="[% issue.renewals_count | html %]" data-issueid="[% issue.issue_id | html %]" href="#">View</a> ]
112 <td data-order="[% issue.issuedate | html %]">
113 [% issue.issuedate |$KohaDates with_hours => 1 %]
115 <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
116 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
117 <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
119 <td data-order="[% issue.date_due | html %]">
120 [% issue.date_due | $KohaDates as_due_date => 1 %]
122 [% IF issue.returndate %]
123 <td data-order="[% issue.returndate | html %]">
124 [% issue.returndate |$KohaDates with_hours => 1 %]
126 <td data-order="checked out">
127 <small>Checked out</small>
136 [% IF Koha.Preference('OnSiteCheckouts') %]
137 [% WRAPPER tabs id= "tabs" %]
138 [% WRAPPER tabs_nav %]
139 [% WRAPPER tab_item tabname= "tab_all" bt_active= 1 %] <span>All</span> [% END %]
140 [% WRAPPER tab_item tabname= "tab_checkout" %] <span>Checkouts</span> [% END %]
141 [% WRAPPER tab_item tabname= "tab_onsite_checkout" %] <span>On-site checkouts</span> [% END %]
142 [% END # /WRAPPER tabs_nav %]
143 [% WRAPPER tab_panels %]
144 [% WRAPPER tab_panel tabname="readingrec" bt_active= 1 %]
145 [% INCLUDE table_readingrec %]
146 [% END # /tab_panel# %]
147 [% END # /WRAPPER tab_panels %]
148 [% END # /WRAPPER tabs %]
150 <div class="page-section">
151 [% INCLUDE table_readingrec %]
152 </div> <!-- /.page-section -->
153 [% END # /IF Koha.Preference('OnSiteCheckouts') %]
157 </div> <!-- /.col-sm-10.col-sm-push-2 -->
159 <div class="col-sm-2 col-sm-pull-10">
161 [% INCLUDE 'circ-menu.inc' %]
163 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
164 </div> <!-- /.row -->
166 [% MACRO jsinclude BLOCK %]
167 [% INCLUDE 'str/members-menu.inc' %]
168 [% Asset.js("js/members-menu.js") | $raw %]
169 [% INCLUDE 'datatables.inc' %]
170 [% INCLUDE 'columns_settings.inc' %]
171 [% INCLUDE 'modals/checkout_renewals.inc' %]
172 [% INCLUDE 'js-date-format.inc' %]
173 [% INCLUDE 'js-patron-format.inc' %]
174 [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
176 $(document).ready(function() {
177 var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
178 var table = KohaTable("table_readingrec", {
179 "sPaginationType": "full",
180 "aaSorting": [[10, 'desc']]
183 $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
184 active_tab = $(this).attr("href");
185 if( active_tab == "#tab_checkout_panel" ){
186 table.fnFilter("standard_checkout", 0);
187 } else if( active_tab == "#tab_onsite_checkout_panel" ){
188 table.fnFilter("onsite_checkout", 0);
190 table.fnFilter('', 0);
197 [% INCLUDE 'intranet-bottom.inc' %]