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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
29 <a href="#" aria-current="page">
30 Circulation history for [% INCLUDE 'patron-title.inc' %]
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
42 [% INCLUDE 'members-toolbar.inc' %]
43 <h1>Circulation history</h1>
45 [% UNLESS Koha.Preference('intranetreadinghistory') %]
46 <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
47 [% ELSIF is_anonymous %]
48 <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>
49 [% ELSIF ( patron.privacy == 2) %]
50 <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
51 [% ELSIF ( !loop_reading ) %]
52 <div class="dialog message">This patron has no circulation history.</div>
54 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
57 <div id="tabs" class="toptabs">
58 [% IF Koha.Preference('OnSiteCheckouts') %]
59 <ul class="nav nav-tabs" role="tablist">
60 <li role="presentation" class="active"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" data-tabname="all" id="tab_all">All</a></li>
61 <li role="presentation"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" data-tabname="checkouts" id="tab_checkout">Checkouts</a></li>
62 <li role="presentation"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" id="tab_onsite_checkout" data-tabname="onsite">On-site checkouts</a></li>
64 <div class="tab-content">
65 <div id="readingrec" role="tabpanel" class="tab-pane active">
67 <div id="readingrec" class="page-section">
69 <table id="table_readingrec">
72 <th style="display:none;">Type</th>
74 <th class="anti-the">Title</th>
79 <th>Number of renewals</th>
80 <th>Checked out on</th>
81 <th>Checked out from</th>
82 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
83 <th>Checked out by</th>
90 [% FOREACH issue IN loop_reading %]
91 [% IF issue.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %]
92 <td style="display:none;">
93 [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
94 [% ELSE %][% issuetype = 'standard_checkout' | html %]
96 [% issuetype | html %]
98 <td data-order="[% issue.issuestimestamp | html %]">
99 [% issue.issuestimestamp | $KohaDates with_hours => 1 %]
102 [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
105 <td>[% issue.author | html %]</td>
108 [% IF issue.classification %]
109 [% issue.classification | html %]
111 [% issue.itemcallnumber | html %]
116 [% IF issue.enumchron %]
117 [% issue.enumchron | html %]
121 <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>
123 [% issue.renewals_count | html %]
124 [% IF issue.renewals_count > 0 %]
125 [ <a class="checkout_renewals_view" data-renewals="[% issue.renewals_count | html %]" data-issueid="[% issue.issue_id | html %]" href="#">View</a> ]
128 <td data-order="[% issue.issuedate | html %]">
129 [% issue.issuedate |$KohaDates with_hours => 1 %]
131 <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
132 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
133 <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
135 <td data-order="[% issue.date_due | html %]">
136 [% issue.date_due |$KohaDates with_hours => 1 %]
138 [% IF issue.returndate %]
139 <td data-order="[% issue.returndate | html %]">
140 [% issue.returndate |$KohaDates with_hours => 1 %]
142 <td data-order="checked out">
143 <small>Checked out</small>
151 [% IF Koha.Preference('OnSiteCheckouts') %]
152 </div> <!-- /.tab-content -->
158 </div> <!-- /.col-sm-10.col-sm-push-2 -->
160 <div class="col-sm-2 col-sm-pull-10">
162 [% INCLUDE 'circ-menu.inc' %]
164 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
165 </div> <!-- /.row -->
167 [% MACRO jsinclude BLOCK %]
168 [% INCLUDE 'str/members-menu.inc' %]
169 [% Asset.js("js/members-menu.js") | $raw %]
170 [% INCLUDE 'datatables.inc' %]
171 [% INCLUDE 'columns_settings.inc' %]
172 [% INCLUDE 'modals/checkout_renewals.inc' %]
173 [% INCLUDE 'js-date-format.inc' %]
174 [% INCLUDE 'js-patron-format.inc' %]
175 [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
177 $(document).ready(function() {
178 var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
179 var table = KohaTable("table_readingrec", {
180 "sPaginationType": "full",
181 "aaSorting": [[10, 'desc']]
184 $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
185 active_tab = $(this).data("tabname");
186 if( active_tab == "checkouts" ){
187 table.fnFilter("standard_checkout", 0);
188 } else if( active_tab == "onsite" ){
189 table.fnFilter("onsite_checkout", 0);
191 table.fnFilter('', 0);
198 [% INCLUDE 'intranet-bottom.inc' %]