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