Bug 30952: Fix style of some buttons
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / readingrec.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Koha %]
5 [% USE AuthorisedValues %]
6 [% USE Branches %]
7 [% USE TablesSettings %]
8 [% SET footerjs = 1 %]
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' %]
12 </head>
13
14 <body id="pat_readingrec" class="pat">
15 [% WRAPPER 'header.inc' %]
16     [% INCLUDE 'patron-search-header.inc' %]
17 [% END %]
18
19 [% WRAPPER 'sub-header.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
21     <ol>
22         <li>
23             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24         </li>
25         <li>
26             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
27         </li>
28         <li>
29             <a href="#" aria-current="page">
30                 Circulation history for [% INCLUDE 'patron-title.inc' %]
31             </a>
32         </li>
33     </ol>
34 </nav>
35 [% END %]
36
37 <div class="main container-fluid">
38     <div class="row">
39         <div class="col-sm-10 col-sm-push-2">
40             <main>
41
42 [% INCLUDE 'members-toolbar.inc' %]
43 <h1>Circulation history</h1>
44
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>
53 [% ELSE %]
54 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
55
56
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>
63   </ul>
64   <div class="tab-content">
65       <div id="readingrec" role="tabpanel" class="tab-pane active">
66   [% ELSE %]
67     <div id="readingrec">
68   [% END %]
69     <table id="table_readingrec">
70       <thead>
71         <tr>
72         <th style="display:none;">Type</th>
73         <th>Date</th>
74         <th class="anti-the">Title</th>
75         <th>Author</th>
76         <th>Call number</th>
77         <th>Barcode</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>
83         [% END %]
84         <th>Date due</th>
85         <th>Return date</th>
86         </tr>
87       </thead>
88       <tbody>
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 %]
94             [% END %]
95             [% issuetype | html %]
96           </td>
97           <td data-order="[% issue.issuestimestamp | html %]">
98               [% issue.issuestimestamp | $KohaDates  with_hours => 1 %]
99           </td>
100           <td>
101             [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
102             </td>
103
104           <td>[% issue.author | html %]</td>
105
106           <td>
107             [% IF issue.classification %]
108                 [% issue.classification | html %]
109             [% ELSE %]
110                 [% issue.itemcallnumber | html %]
111             [% END %]
112           </td>
113
114           <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% issue.itemnumber | uri %]&amp;biblionumber=[% issue.biblionumber | uri %]&amp;bi=[% issue.biblioitemnumber | uri %]#item[% issue.itemnumber | uri %]">[% issue.barcode | html %]</a></td>
115           <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> ]
119               [% END %]
120           </td>
121           <td data-order="[% issue.issuedate | html %]">
122               [% issue.issuedate |$KohaDates  with_hours => 1 %]
123           </td>
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>
127           [% END %]
128           <td data-order="[% issue.date_due | html %]">
129               [% issue.date_due |$KohaDates  with_hours => 1 %]
130           </td>
131             [% IF  issue.returndate %]
132                 <td data-order="[% issue.returndate | html %]">
133                 [% issue.returndate |$KohaDates  with_hours => 1 %]
134             [% ELSE %]
135                 <td data-order="checked out">
136                 <small>Checked out</small>
137             [% END %]
138           </td>
139         </tr>
140       [% END %]
141       </tbody>
142     </table>
143   </div>
144   [% IF Koha.Preference('OnSiteCheckouts') %]
145     </div> <!-- /.tab-content -->
146   [% END %]
147 </div>
148 [% END %]
149
150             </main>
151         </div> <!-- /.col-sm-10.col-sm-push-2 -->
152
153         <div class="col-sm-2 col-sm-pull-10">
154             <aside>
155                 [% INCLUDE 'circ-menu.inc' %]
156             </aside>
157         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
158      </div> <!-- /.row -->
159
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 %]
170     <script id="js">
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']]
176             }, table_settings);
177
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);
184                 } else {
185                     table.fnFilter('', 0);
186                 }
187             });
188         });
189     </script>
190 [% END %]
191
192 [% INCLUDE 'intranet-bottom.inc' %]