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