Bug 27408: (follow-up) Updates to accommodate currency entry
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / holdshistory.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Koha %]
5 [% USE AuthorisedValues %]
6 [% USE Branches %]
7 [% USE TablesSettings %]
8 [% USE ItemTypes %]
9 [% SET footerjs = 1 %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Holds history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 </head>
14
15 <body id="pat_holdshistory" class="pat">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'patron-search.inc' %]
18
19 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Holds history for [% INCLUDE 'patron-title.inc' %]</div>
20
21 <div class="main container-fluid">
22     <div class="row">
23         <div class="col-sm-10 col-sm-push-2">
24             <main>
25
26 [% INCLUDE 'members-toolbar.inc' %]
27 <h1>Holds history</h1>
28
29 [% UNLESS Koha.Preference('intranetreadinghistory') %]
30     <div class="dialog alert">Staff members are not allowed to access patron's holds history</div>
31 [% ELSIF is_anonymous %]
32     <div class="dialog alert">This is the anonymous patron, so no holds history is displayed.</div>
33 [% ELSIF ( !holds ) %]
34     <div class="dialog message">This patron has no holds history.</div>
35 [% ELSE %]
36
37 [% SET show_itemtype_column = Koha.Preference('AllowHoldItemTypeSelection') %]
38
39 <div id="holdshistory">
40   <table id="table_holdshistory">
41       <thead>
42         <tr>
43         <th class="anti-the">Title</th>
44         <th>Author</th>
45         <th>Barcode</th>
46         <th>Library</th>
47         <th class="title-string">Hold date</th>
48         <th class="title-string">Expiration date</th>
49         <th class="title-string">Waiting date</th>
50         <th class="title-string">Cancellation date</th>
51         [% IF show_itemtype_column %]
52           <th>Requested item type</th>
53         [% END %]
54         <th>Status</th>
55         </tr>
56       </thead>
57       <tbody>
58       [% FOREACH hold IN holds %]
59         <tr>
60           <td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link = 1 %]</td>
61           <td>[% hold.biblio.author | html %]</td>
62           <td>[% hold.item.barcode | html %]</td>
63           <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
64           <td><span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</span></td>
65           <td>
66               [% IF hold.expirationdate %]
67                   <span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</span>
68               [% ELSE %]
69                   <span title="0000-00-00"></span>
70               [% END %]
71           </td>
72           <td>
73               [% IF hold.waitingdate %]
74                   <span title="[% hold.waitingdate | html %]">[% hold.waitingdate | $KohaDates %]</span>
75               [% ELSE %]
76                   <span title="0000-00-00"></span>
77               [% END %]
78           </td>
79           <td>
80               [% IF hold.cancellationdate %]
81                   <span title="[% hold.cancellationdate | html %]">[% hold.cancellationdate | $KohaDates %]</span>
82               [% ELSE %]
83                   <span title="0000-00-00"></span>
84               [% END %]
85           </td>
86           [% IF show_itemtype_column %]
87             <td>
88               [% IF hold.itemtype %]
89                   [% ItemTypes.GetDescription( hold.itemtype ) | html %]
90               [% ELSE %]
91                   <span>Any item type</span>
92               [% END %]
93             </td>
94           [% END %]
95           <td>
96           [% IF hold.found == 'F' %]
97               Fulfilled
98           [% ELSIF hold.cancellationdate %]
99               Cancelled
100                 [% IF hold.cancellation_reason %]
101                     ([% AuthorisedValues.GetByCode('HOLD_CANCELLATION', hold.cancellation_reason) | html %])
102                 [% END %]
103           [% ELSIF hold.found == 'W' %]
104               Waiting
105           [% ELSIF hold.found == 'P' %]
106               Processing
107           [% ELSIF hold.found == 'T' %]
108               In transit
109           [% ELSE %]
110               Pending
111           [% END %]
112           </td>
113         </tr>
114       [% END %]
115       </tbody>
116   </table>
117 </div>
118
119 [% END %]
120
121             </main>
122         </div> <!-- /.col-sm-10.col-sm-push-2 -->
123
124         <div class="col-sm-2 col-sm-pull-10">
125             <aside>
126                 [% INCLUDE 'circ-menu.inc' %]
127             </aside>
128         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
129      </div> <!-- /.row -->
130
131 [% MACRO jsinclude BLOCK %]
132     [% INCLUDE 'datatables.inc' %]
133     [% INCLUDE 'columns_settings.inc' %]
134     [% INCLUDE 'str/members-menu.inc' %]
135     [% Asset.js("js/members-menu.js") | $raw %]
136     <script>
137         $(document).ready(function() {
138             var columns_settings = [% TablesSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
139             [% UNLESS show_itemtype_column %]
140               //Remove item type column settings
141               columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';});
142             [% END %]
143             var table = KohaTable("table_holdshistory", {
144                 "sPaginationType": "full",
145                 "aaSorting": [[4, 'desc']],
146                 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
147             }, columns_settings);
148         });
149     </script>
150 [% END %]
151
152 [% INCLUDE 'intranet-bottom.inc' %]