Bug 15091: Batch Checkout: Set titles above result tables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation_batch_checkouts.tt
1 [% USE Branches %]
2 [% USE KohaDates %]
3 [% IF ( export_remove_fields OR export_with_csv_profile ) %]
4    [% SET exports_enabled = 1 %]
5 [% END %]
6 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 [% SET destination = "circ" %]
9 <title>Koha &rsaquo; Circulation
10 [% IF borrowernumber %]
11   &rsaquo; Batch check out &rsaquo; Issuing items to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
12 [% END %]
13 </title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% INCLUDE 'calendar.inc' %]
16 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
17 [% INCLUDE 'datatables.inc' %]
18 [% INCLUDE 'datatables-strings.inc' %]
19 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
20 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
21 <script type="text/javascript">
22 //<![CDATA[
23 $(document).ready(function() {
24         if($('#barcodelist').length) {
25             $('#barcodelist').focus();
26         } else if ($('#checkoutrenew').length) {
27             $('#checkoutrenew').focus();
28         }
29         $("#issuest").dataTable($.extend(true, {}, dataTablesDefaults, {
30             "sDom": 't',
31             "aaSorting": [],
32             "aoColumnDefs": [
33                 { "aTargets": [ -1, -2[% IF ( exports_enabled ) %], -3[% END %] ], "bSortable": false, "bSearchable": false }
34             ],
35             "aoColumns": [
36                 { "sType": "title-string" },{ "sType": "html" },null,{ "sType": "title-string" },null,null,null,null,null,null[% IF ( exports_enabled ) %],null[% END %]
37             ],
38             "bPaginate": false
39         }));
40  });
41 //]]>
42 </script>
43 </head>
44 <body id="circ_circulation_batch_checkouts" class="circ">
45
46 [% INCLUDE 'header.inc' %]
47 [% INCLUDE 'circ-search.inc' %]
48
49 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;
50     <a href="/cgi-bin/koha/circ/circulation.pl">Batch check out</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
51 </div>
52 <div id="doc3" class="yui-t2">
53
54    <div id="bd">
55 <div id="yui-main">
56 <div class="yui-b">
57
58 <div class="yui-g">
59
60 [% IF ( borrowernumber ) %]
61 [% INCLUDE 'members-toolbar.inc' %]
62 [% END %]
63
64 [% IF NOT batch_allowed %]
65   <div class="dialog message">You are not allowed to use batch checkout for this patron</div>
66 [% ELSIF NOT checkout_infos %]
67   <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
68     <fieldset id="circ_circulation_issue">
69       <label for="barcode">Issuing items to [% INCLUDE 'patron-title.inc' %]</label>
70       <fieldset class="rows">
71         <legend>Use a file</legend>
72         <ol>
73           <li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li>
74         </ol>
75       </fieldset>
76       <fieldset class="rows">
77         <legend>Or list barcodes one by one</legend>
78         <ol>
79           <li>
80             <label for="barcodelist">Barcode list (one barcode per line): </label>
81             <textarea rows="10" cols="30" id="barcodelist" name="barcodelist"></textarea>
82           </li>
83         </ol>
84       </fieldset>
85       <input type="hidden" name="op" value="show" />
86       <fieldset class="action">
87         <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
88         <input type="hidden" name="branch" value="[% branch %]" />
89         <input type="hidden" name="batch" value="1" />
90         <input type="submit" value="Check out" class="button" />
91       </fieldset>
92     </fieldset>
93   </form>
94
95 [% ELSE %]
96   [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
97     <h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h1>
98     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
99   [% ELSE %]
100     <h3>Batch checkout information [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h1>
101   [% END %]
102     <table id="checkout_infos">
103       <thead>
104         <tr>
105           [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
106             <th></th>
107           [% END %]
108           <th>Barcode</th>
109           <th>Title</th>
110           <th>Information</th>
111         </tr>
112       </thead>
113       <tbody>
114         [% FOR checkout_info IN checkout_infos %]
115           <tr>
116             [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
117               <td>
118                 [% IF checkout_info.NEEDSCONFIRMATION %]
119                   <input type="checkbox" name="barcodes" value="[% checkout_info.barcode %]" checked="checked" />
120                 [% END %]
121               </td>
122             [% END %]
123             <td>[% checkout_info.barcode %]</td>
124             <td>
125               <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% checkout_info.item.biblionumber %]&amp;type=intra"><strong>[% checkout_info.item.title |html %][% FOREACH subtitl IN checkout_info.item.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF checkout_info.item.author %], by [% checkout_info.item.author %][% END %][% IF ( checkout_info.itme.itemnotes ) %]- <span class="circ-hlt">[% checkout_info.item.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% checkout_info.item.biblionumber %]&amp;itemnumber=[% checkout_info.item.itemnumber %]#item[% checkout_info.item.itemnumber %]">[% checkout_info.item.barcode %]</a>
126             </td>
127             <td>
128               [% IF checkout_info.NEEDSCONFIRMATION %]
129                 <p class="warn">
130                   [% IF checkout_info.AGE_RESTRICTION %]
131                     Age restriction [% checkout_info.AGE_RESTRICTION %]
132                   [% END %]
133                   [% IF checkout_info.DEBT %]
134                     The patron has a debt of [% checkout_info.DEBT %] <!-- Need debt_confirmed -->
135                   [% END %]
136                   [% IF checkout_info.RENEW_ISSUE %]
137                     This Item is currently checked out to this patron. Renew?
138                   [% END %]
139                   [% IF checkout_info.RESERVE_WAITING %]
140                     This Item has been waiting for another patron.
141                   [% END %]
142                   [% IF checkout_info.RESERVED %]
143                     This Item has been on hold for another patron.
144                   [% END %]
145                   [% IF checkout_info.ISSUED_TO_ANOTHER %]
146                     This Item is checked out to another patron.
147                     [% IF CAN_user_circulate_force_checkout %]
148                       Check in and check out?
149                     [% END %]
150                   [% END %]
151                   [% IF checkout_info.TOO_MANY %]
152                     Too many checked out.
153                   [% END %]
154                   [% IF checkout_info.BORRNOTSAMEBRANCH %]
155                     This patrons is from a different library ([% checkout_info.BORRNOTSAMEBRANCH %])</li>
156                   [% END %]
157                   [% IF checkout_ino.PATRON_CANT %]
158                     This patron can't check out this item per library circulation policy.
159                   [% END %]
160                   [% IF checkout_info.NOT_FOR_LOAN_FORCING %]
161                     [% IF checkout_info.itemtype_notforloan %]
162                       Item type is normally not for loan.
163                     [% ELSIF checkout_info.item_notforloan %]
164                       [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, checkout_info.item_notforloan, 0 ) %]
165                       Item is normally not for loan [% IF item_notforloan_lib %]([% item_notforloan_lib %])[% END %].
166                     [% END %]
167                   [% END %]
168                   [% IF checkout_info.USERBLOCKEDOVERDUE %]
169                     Patron has [% checkout_info.USERBLOCKEDOVERDUE %] overdue item(s).
170                   [% END %]
171                   [% IF checkout_info.ITEM_LOST %]
172                     This item has been lost with a status of "[% checkout_info.ITEM_LOST %]".
173                   [% END %]
174                   [% IF checkout_info.HIGHHOLDS %]
175                     High demand item. Loan period shortened to [% checkout_info.HIGHHOLDS.duration %] days (due [% checkout_info.HIGHHOLDS.returndate %]).
176                   [% END %]
177                   [% IF checkout_info.HIGHHOLDS %] <!-- FIXME -->
178                       <script language="JavaScript" type="text/javascript">
179                           $(document).ready(function() {
180                               $("input[name=duedatespec]:hidden").val('[% checkout_info.HIGHHOLDS.returndate %]');
181                           });
182                       </script>
183                   [% END %]
184
185                   [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout or checkout_info.HIGHHOLDS ) %]
186                       [% IF checkout_info.RESERVED || checkout_info.RESERVE_WAITING %] <!-- arbitrary choice, revert the reserve is not possible-->
187                         <p>This item is on hold for another patron. The hold will be overridden, but not cancelled.</p>
188                       [% END %]
189                   [% END %]
190                 </p>
191               [% END %]
192
193
194               [% IF checkout_info.alert.ITEM_LOST || checkout_info.alert.OTHER_CHARGES %]
195                 <p class="info">
196                   [% IF checkout_info.alert.ITEM_LOST %]
197                     This item has been lost with a status of "[% checkout_info.alert.ITEM_LOST %]".
198                   [% END %]
199                   [% IF checkout_info.alert.OTHER_CHARGES %]
200                     The patron has unpaid charges for reserves, rentals etc of [% checkout_info.alert.OTHER_CHARGES %].
201                   [% END %]
202                 </p>
203               [% END %]
204
205
206               [% IF checkout_info.IMPOSSIBLE %]
207                 <p class="error">
208                   [% IF checkout_info.STATS  %]
209                     Local use recorded
210                   [% END %]
211
212                   [% IF checkout_info.NOT_FOR_LOAN %]
213                     [% IF checkout_info.itemtype_notforloan %]
214                       Item type not for loan.
215                     [% ELSIF checkout_info.item_notforloan %]
216                       [% item_notforloan_lib = AuthorisedValues.GetByCode( checkout_info.authvalcode_notforloan, checkout_info.item_notforloan, 0 ) %]
217                       Item not for loan [% IF checkout_info.item_notforloan_lib %]([% checkout_info.item_notforloan_lib %])[% END %].
218                     [% END %]
219                   [% END %]
220                   [% IF checkout_info.WTHDRAWN %]
221                     Item has been withdrawn
222                   [% END %]
223                   [% IF checkout_info.RESTRICTED %]
224                     Item is restricted
225                   [% END %]
226                   [% IF checkout_info.GNA %]
227                     Patron's address is in doubt
228                   [% END %]
229                   [% IF checkout_info.CARD_LOST %]
230                     Patron's card is lost
231                   [% END %]
232                   [% IF checkout_info.DEBARRED %]
233                     Patron is restricted
234                   [% END %]
235                   [% IF checkout_info.NO_MORE_RENEWALS %]
236                     No more renewals possible
237                   [% END %]
238                   [% IF checkout_info.EXPIRED %]
239                     Patron's card is expired
240                   [% END %]
241                   [% IF checkout_info.ITEMNOTSAMEBRANCH %]
242                     This item belongs to [% Branches.GetName( checkout_info.itemhomebranch ) %] and cannot be checked out from this location.
243                   [% END %]
244                   [% IF checkout_info.USERBLOCKEDREMAINING %]
245                     Patron has had overdue items and is blocked for [% checkout_info.USERBLOCKEDREMAINING %] day(s).
246                   [% END %]
247                   [% IF checkout_info.USERBLOCKEDOVERDUE %]
248                       Checkouts are BLOCKED because patron has overdue items
249                   [% END %]
250                   [% IF checkout_info.TOO_MANY %]
251                     Too many checked out.
252                   [% END %]
253                   [% IF checkout_info.UNKNOWN_BARCODE %]
254                     <li>The barcode was not found [% checkout_info.barcode |html %]
255                   [% END %]
256                 </p>
257               [% END %]
258             </td>
259           </tr>
260         [% END %]
261       </tbody>
262     </table>
263
264     [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
265       <h3>Please confirm checkout</h3>
266       <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
267       <input type="hidden" name="issueconfirmed" value="1" />
268       <input type="hidden" name="debt_confirmed" value="1" />
269       <input type="hidden" name="branch" value="[% branch %]" />
270       <input type="hidden" name="batch" value="1" />
271       <input type="submit" id="checkoutrenew" class="approve" value="Checkout or renew" />
272     </form>
273     [% END %]
274
275 [% END %]
276
277 </div>
278 </div>
279 </div>
280 <div class="yui-b">
281 [% INCLUDE 'circ-menu.inc' %]
282 </div>
283 </div>
284 [% INCLUDE 'intranet-bottom.inc' %]