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">
69 <table id="table_readingrec">
72 <th style="display:none;">Type</th>
74 <th class="anti-the">Title</th>
78 <th>Number of renewals</th>
79 <th>Checked out on</th>
80 <th>Checked out from</th>
81 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
82 <th>Checked out by</th>
89 [% FOREACH issue IN loop_reading %]
90 [% IF issue.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %]
91 <td style="display:none;">
92 [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
93 [% ELSE %][% issuetype = 'standard_checkout' | html %]
95 [% issuetype | html %]
97 <td data-order="[% issue.issuestimestamp | html %]">
98 [% issue.issuestimestamp | $KohaDates with_hours => 1 %]
101 [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
104 <td>[% issue.author | html %]</td>
107 [% IF issue.classification %]
108 [% issue.classification | html %]
110 [% issue.itemcallnumber | html %]
114 <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>
116 [% issue.renewals_count | html %]
117 [% IF issue.renewals_count > 0 %]
118 [ <a class="checkout_renewals_view" data-renewals="[% issue.renewals_count | html %]" data-issueid="[% issue.issue_id | html %]" href="#">View</a> ]
121 <td data-order="[% issue.issuedate | html %]">
122 [% issue.issuedate |$KohaDates with_hours => 1 %]
124 <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
125 [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
126 <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
128 <td data-order="[% issue.date_due | html %]">
129 [% issue.date_due |$KohaDates with_hours => 1 %]
131 [% IF issue.returndate %]
132 <td data-order="[% issue.returndate | html %]">
133 [% issue.returndate |$KohaDates with_hours => 1 %]
135 <td data-order="checked out">
136 <small>Checked out</small>
144 [% IF Koha.Preference('OnSiteCheckouts') %]
145 </div> <!-- /.tab-content -->
151 </div> <!-- /.col-sm-10.col-sm-push-2 -->
153 <div class="col-sm-2 col-sm-pull-10">
155 [% INCLUDE 'circ-menu.inc' %]
157 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
158 </div> <!-- /.row -->
160 [% MACRO jsinclude BLOCK %]
161 [% INCLUDE 'str/members-menu.inc' %]
162 [% Asset.js("js/members-menu.js") | $raw %]
163 [% INCLUDE 'datatables.inc' %]
164 [% INCLUDE 'columns_settings.inc' %]
165 [% INCLUDE 'modals/checkout_renewals.inc' %]
166 [% INCLUDE 'str/checkout_renewals.inc' %]
167 [% INCLUDE 'js-date-format.inc' %]
168 [% INCLUDE 'js-patron-format.inc' %]
169 [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
171 $(document).ready(function() {
172 var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
173 var table = KohaTable("table_readingrec", {
174 "sPaginationType": "full",
175 "aaSorting": [[10, 'desc']]
178 $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
179 active_tab = $(this).data("tabname");
180 if( active_tab == "checkouts" ){
181 table.fnFilter("standard_checkout", 0);
182 } else if( active_tab == "onsite" ){
183 table.fnFilter("onsite_checkout", 0);
185 table.fnFilter('', 0);
192 [% INCLUDE 'intranet-bottom.inc' %]