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 [% SET all_checkouts = checkouts.merge(old_checkouts) %]
47 [% UNLESS Koha.Preference('intranetreadinghistory') %]
48 <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
49 [% ELSIF is_anonymous %]
50 <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>
51 [% ELSIF ( patron.privacy == 2) %]
52 <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
53 [% ELSIF ( !all_checkouts.size ) %]
54 <div class="dialog message">This patron has no circulation history.</div>
56 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
58 [% BLOCK table_readingrec %]
59 <table id="table_readingrec">
62 <th style="display:none;">Type</th>
64 <th class="anti-the">Title</th>
69 <th>Number of renewals</th>
70 <th>Checked out on</th>
71 <th>Checked out from</th>
72 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
73 <th>Checked out by</th>
80 [% FOREACH checkout IN all_checkouts %]
81 [% SET item = checkout.item %]
82 [% SET biblio = item.biblio %]
83 [% IF checkout.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %]
84 <td style="display:none;">
85 [% IF checkout.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
86 [% ELSE %][% issuetype = 'standard_checkout' | html %]
88 [% issuetype | html %]
90 <td data-order="[% checkout.timestamp | html %]">
91 [% checkout.timestamp | $KohaDates with_hours => 1 %]
94 [% INCLUDE 'biblio-title.inc' biblio=biblio link = 1 %]
97 <td>[% biblio.author | html %]</td>
100 [% item.itemcallnumber | html %]
104 [% IF item.enumchron %]
105 [% item.enumchron | html %]
109 <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>
111 [% checkout.renewals_count | html %]
112 [% IF checkout.renewals_count > 0 %]
113 [ <a class="checkout_renewals_view" data-renewals="[% checkout.renewals_count | html %]" data-issueid="[% checkout.issue_id | html %]" href="#">View</a> ]
116 <td data-order="[% checkout.issuedate | html %]">
117 [% checkout.issuedate | $KohaDates with_hours => 1 %]
119 <td>[% Branches.GetName( checkout.branchcode ) | html %]</td>
120 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
121 [% SET issuer = checkout.issuer %]
122 <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issuer.issuer_id | uri %]">[% issuer.firstname | html %] [% issuer.surname | html %]</a></td>
124 <td data-order="[% checkout.date_due | html %]">
125 [% checkout.date_due | $KohaDates as_due_date => 1 %]
127 [% IF checkout.returndate %]
128 <td data-order="[% checkout.returndate | html %]">
129 [% checkout.returndate | $KohaDates with_hours => 1 %]
131 <td data-order="checked out">
132 <small>Checked out</small>
141 [% IF Koha.Preference('OnSiteCheckouts') %]
142 [% WRAPPER tabs id= "tabs" %]
143 [% WRAPPER tabs_nav %]
144 [% WRAPPER tab_item tabname= "tab_all" bt_active= 1 %] <span>All</span> [% END %]
145 [% WRAPPER tab_item tabname= "tab_checkout" %] <span>Checkouts</span> [% END %]
146 [% WRAPPER tab_item tabname= "tab_onsite_checkout" %] <span>On-site checkouts</span> [% END %]
147 [% END # /WRAPPER tabs_nav %]
148 [% WRAPPER tab_panels %]
149 [% WRAPPER tab_panel tabname="readingrec" bt_active= 1 %]
150 [% INCLUDE table_readingrec %]
151 [% END # /tab_panel# %]
152 [% END # /WRAPPER tab_panels %]
153 [% END # /WRAPPER tabs %]
155 <div class="page-section">
156 [% INCLUDE table_readingrec %]
157 </div> <!-- /.page-section -->
158 [% END # /IF Koha.Preference('OnSiteCheckouts') %]
162 </div> <!-- /.col-sm-10.col-sm-push-2 -->
164 <div class="col-sm-2 col-sm-pull-10">
166 [% INCLUDE 'circ-menu.inc' %]
168 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
169 </div> <!-- /.row -->
171 [% MACRO jsinclude BLOCK %]
172 [% INCLUDE 'str/members-menu.inc' %]
173 [% Asset.js("js/members-menu.js") | $raw %]
174 [% INCLUDE 'datatables.inc' %]
175 [% INCLUDE 'columns_settings.inc' %]
176 [% INCLUDE 'modals/checkout_renewals.inc' %]
177 [% INCLUDE 'js-date-format.inc' %]
178 [% INCLUDE 'js-patron-format.inc' %]
179 [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
181 $(document).ready(function() {
182 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
183 var column_sort = 11;
185 var column_sort = 10;
187 var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
188 var table = KohaTable("table_readingrec", {
189 "sPaginationType": "full",
190 "aaSorting": [[column_sort, 'desc']]
193 $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
194 active_tab = $(this).attr("href");
195 if( active_tab == "#tab_checkout_panel" ){
196 table.fnFilter("standard_checkout", 0);
197 } else if( active_tab == "#tab_onsite_checkout_panel" ){
198 table.fnFilter("onsite_checkout", 0);
200 table.fnFilter('', 0);
207 [% INCLUDE 'intranet-bottom.inc' %]