5 [% USE AuthorisedValues %]
7 [% USE TablesSettings %]
8 [% PROCESS 'i18n.inc' %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>[% FILTER collapse %]
12 [% t("Circulation history for") | html %] [% INCLUDE 'patron-title.inc' no_html = 1 %]
13 [% t("Patrons") | html %] ›
14 [% t("Koha") | html %]
16 [% INCLUDE 'doc-head-close.inc' %]
19 <body id="pat_readingrec" class="pat">
20 [% WRAPPER 'header.inc' %]
21 [% INCLUDE 'patron-search-header.inc' %]
24 [% WRAPPER 'sub-header.inc' %]
25 [% WRAPPER breadcrumbs %]
26 [% WRAPPER breadcrumb_item %]
27 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
29 [% WRAPPER breadcrumb_item %]
30 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
32 [% WRAPPER breadcrumb_item bc_active= 1 %]
33 <span>Circulation history</span>
35 [% END #/ WRAPPER breadcrumbs %]
36 [% END #/ WRAPPER sub-header.inc %]
38 <div class="main container-fluid">
40 <div class="col-sm-10 col-sm-push-2">
43 [% INCLUDE 'members-toolbar.inc' %]
44 <h1>Circulation history</h1>
46 [% UNLESS checkouts %][% checkouts = [] %][% END %]
47 [% UNLESS old_checkouts %][% old_checkouts = [] %][% END %]
48 [% SET all_checkouts = checkouts.merge(old_checkouts) %]
49 [% UNLESS Koha.Preference('intranetreadinghistory') %]
50 <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
51 [% ELSIF is_anonymous %]
52 <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>
53 [% ELSIF ( patron.privacy == 2) %]
54 <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
55 [% ELSIF ( !all_checkouts.size ) %]
56 <div class="dialog message">This patron has no circulation history.</div>
58 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
60 [% BLOCK table_readingrec %]
61 <table id="table_readingrec">
64 <th style="display:none;">Type</th>
66 <th class="anti-the">Title</th>
71 <th>Number of renewals</th>
72 <th>Checked out on</th>
73 <th>Checked out from</th>
74 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
75 <th>Checked out by</th>
82 [% FOREACH checkout IN all_checkouts %]
83 [% SET item = checkout.item %]
84 [% SET biblio = item.biblio %]
85 [% IF checkout.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %]
86 <td style="display:none;">
87 [% IF checkout.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
88 [% ELSE %][% issuetype = 'standard_checkout' | html %]
90 [% issuetype | html %]
92 <td data-order="[% checkout.timestamp | html %]">
93 [% checkout.timestamp | $KohaDates with_hours => 1 %]
96 [% INCLUDE 'biblio-title.inc' biblio=biblio link = 1 %]
99 <td>[% biblio.author | html %]</td>
102 [% item.itemcallnumber | html %]
106 [% IF item.enumchron %]
107 [% item.enumchron | html %]
111 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&biblionumber=[% biblio.biblionumber | uri %]&bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
113 [% checkout.renewals_count | html %]
114 [% IF checkout.renewals_count > 0 %]
115 [ <a class="checkout_renewals_view" data-renewals="[% checkout.renewals_count | html %]" data-issueid="[% checkout.issue_id | html %]" href="#">View</a> ]
118 <td data-order="[% checkout.issuedate | html %]">
119 [% checkout.issuedate | $KohaDates with_hours => 1 %]
121 <td>[% Branches.GetName( checkout.branchcode ) | html %]</td>
122 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
123 [% SET issuer = checkout.issuer %]
124 <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issuer.borrowernumber | uri %]">[% issuer.firstname | html %] [% issuer.surname | html %]</a></td>
126 <td data-order="[% checkout.date_due | html %]">
127 [% checkout.date_due | $KohaDates as_due_date => 1 %]
129 [% IF checkout.returndate %]
130 <td data-order="[% checkout.returndate | html %]">
131 [% checkout.returndate | $KohaDates with_hours => 1 %]
133 <td data-order="checked out">
134 <small>Checked out</small>
143 [% IF Koha.Preference('OnSiteCheckouts') %]
144 [% WRAPPER tabs id= "tabs" %]
145 [% WRAPPER tabs_nav %]
146 [% WRAPPER tab_item tabname= "tab_all" bt_active= 1 %] <span>All</span> [% END %]
147 [% WRAPPER tab_item tabname= "tab_checkout" %] <span>Checkouts</span> [% END %]
148 [% WRAPPER tab_item tabname= "tab_onsite_checkout" %] <span>On-site checkouts</span> [% END %]
149 [% END # /WRAPPER tabs_nav %]
150 [% WRAPPER tab_panels %]
151 [% WRAPPER tab_panel tabname="readingrec" bt_active= 1 %]
152 [% INCLUDE table_readingrec %]
153 [% END # /tab_panel# %]
154 [% END # /WRAPPER tab_panels %]
155 [% END # /WRAPPER tabs %]
157 <div class="page-section">
158 [% INCLUDE table_readingrec %]
159 </div> <!-- /.page-section -->
160 [% END # /IF Koha.Preference('OnSiteCheckouts') %]
164 </div> <!-- /.col-sm-10.col-sm-push-2 -->
166 <div class="col-sm-2 col-sm-pull-10">
168 [% INCLUDE 'circ-menu.inc' %]
170 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
171 </div> <!-- /.row -->
173 [% MACRO jsinclude BLOCK %]
174 [% INCLUDE 'str/members-menu.inc' %]
175 [% Asset.js("js/members-menu.js") | $raw %]
176 [% INCLUDE 'datatables.inc' %]
177 [% INCLUDE 'columns_settings.inc' %]
178 [% INCLUDE 'modals/checkout_renewals.inc' %]
179 [% INCLUDE 'js-date-format.inc' %]
180 [% INCLUDE 'js-patron-format.inc' %]
181 [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
183 $(document).ready(function() {
184 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
185 var column_sort = 11;
187 var column_sort = 10;
189 var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
190 var table = KohaTable("table_readingrec", {
191 "sPaginationType": "full",
192 "aaSorting": [[column_sort, 'desc']]
195 $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
196 active_tab = $(this).attr("href");
197 if( active_tab == "#tab_checkout_panel" ){
198 table.fnFilter("standard_checkout", 0);
199 } else if( active_tab == "#tab_onsite_checkout_panel" ){
200 table.fnFilter("onsite_checkout", 0);
202 table.fnFilter('', 0);
209 [% INCLUDE 'intranet-bottom.inc' %]