Merge branch 'bug_9850' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / branchtransfers.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Circulation &rsaquo; Transfers</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5 <body id="circ_branchtransfers" class="circ">
6 [% INCLUDE 'header.inc' %]
7 [% INCLUDE 'circ-search.inc' %]
8
9 <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; Transfers</div>
10
11 <div id="doc" class="yui-t7">
12    <div id="bd">
13
14 [% IF ( found ) %]
15    <div class="yui-g"> <h3>Reserve found</h3>
16     <table>
17         <caption>
18             [% IF ( reserved ) %]
19                 Reserve found for [% name %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowernumber %]</a>).
20             [% END %]
21             [% IF ( waiting ) %]
22                 Item is marked waiting at [% branchname %] for [% name %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowernumber %]</a>).
23             [% END %]
24         </caption>
25         <tr>
26             <th>
27                 [% IF ( reserved ) %]Set reserve to waiting and transfer book to [% branchname %]: [% END %]
28                 [% IF ( waiting ) %]Cancel reservation and then attempt transfer: [% END %]
29             </th>
30             <td>
31                 <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
32                     [% FOREACH trsfitemloo IN trsfitemloop %]
33                         <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
34                         <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
35                         <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
36                     [% END %]
37                     <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
38                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
39                     [% IF ( waiting ) %]
40                         <input type="hidden" name="barcode" value="[% barcode %]" />
41                         <input type="hidden" name="request" value="KillWaiting" />
42                         <input type="submit" value="Cancel" />
43                     [% END %]
44                     [% IF ( reserved ) %]
45                         <input type="hidden" name="request" value="SetWaiting" />
46                         <input type="submit" value="Waiting" />
47                     [% END %]
48                 </form>
49             </td>
50         </tr>
51             [% IF ( reserved ) %]
52                 <tr>
53                     <th>Cancel reservation and then attempt transfer:</th>
54                     <td>
55                         <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
56                             [% FOREACH trsfitemloo IN trsfitemloop %]
57                                 <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
58                                 <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
59                                 <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
60                             [% END %]
61                             <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
62                             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
63                             <input type="hidden" name="tobranchcd" value="[% tobranchcd %]" />
64                             <input type="hidden" name="barcode" value="[% barcode %]" />
65                             <input type="hidden" name="request" value="KillReserved" />
66                             <input type="submit" value="Cancel" />
67                         </form>
68                     </td>
69                 </tr>
70             [% END %]
71                 <tr>
72                     <th>Ignore and return to transfers: </th>
73                         <td>
74                             <form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
75                                 <input type="hidden" name="tobranchcd" value="[% tobranchcd %]" />
76                                 <input type="hidden" name="barcode" />
77                                 [% FOREACH trsfitemloo IN trsfitemloop %]
78                                     <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
79                                     <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
80                                     <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
81                                 [% END %]
82                                 <input type="submit" value="Ignore" />
83                             </form>
84                         </td>
85                 </tr>
86     </table></div>
87
88 [% ELSE %]
89                     [% IF ( reqmessage ) %]
90                      <div class="dialog message">
91                         <ul>
92                          [% IF ( cancelled ) %]
93                              <li>Reserve cancelled</li>
94                          [% END %]
95                          [% IF ( setwaiting ) %]
96                              <li>Item should now be waiting at library: [% reqbrchname %]</li>
97                          [% END %]
98                          </ul>
99                     </div>
100                      [% END %]
101
102                      [% IF ( errmsgloop ) %]
103                         <div class="dialog message">
104                             <ul>
105                              [% FOREACH errmsgloo IN errmsgloop %]
106                               [% IF ( errmsgloo.errbadcode ) %]
107                                   <li>No Item with barcode: [% errmsgloo.msg %]</li>
108                               [% END %]
109                               [% IF ( errmsgloo.errispermanent ) %]
110                                   <li>Please return item to home library: [% errmsgloo.msg %]</li>
111                               [% END %]
112                               [% IF ( errmsgloo.errnotallowed ) %]
113                                   <li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
114                               [% END %]
115                               [% IF ( errmsgloo.errdesteqholding ) %]
116                                   <li>Item is already at destination library.</li>
117                               [% END %]
118                               [% IF ( errmsgloo.errwasreturned ) %]
119                                   <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
120                                   [% errmsgloo.firstname %] [% errmsgloo.surname %]
121                                   ([% errmsgloo.cardnumber %])</a> and has been returned.</li>
122                               [% END %]
123                           [% END %]
124                           </ul>
125                             </div>
126                         [% END %]
127
128 <div id="branchtransfers">
129     <form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
130         <fieldset class="brief">
131             <legend>Transfer</legend>
132             <ol>
133                         <li>
134                 <label for="tobranchcd">Destination library: </label>
135                     <select name="tobranchcd" id="tobranchcd">
136                         [% FOREACH branchoptionloo IN branchoptionloop %]
137                                                 [% IF ( branchoptionloo.selected ) %]
138                             <option value="[% branchoptionloo.value %]" selected="selected">
139                                                 [% ELSE %]
140                             <option value="[% branchoptionloo.value %]">
141                                                 [% END %]
142                                 [% branchoptionloo.branchname %]
143                             </option>
144                         [% END %]
145                     </select>
146             </li>
147             <li>
148                 <label for="barcode">Enter barcode: </label>
149                 <input name="barcode" id="barcode" size="15" class="focus" /> <input type="submit" value="Submit" />
150             </li>
151                         </ol>
152         </fieldset>
153         <input type="hidden" name="tobranchcd" value="[% tobrancd %]" />
154         [% FOREACH trsfitemloo IN trsfitemloop %]
155             <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
156             <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
157             <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
158         [% END %]
159     </form></div>
160 </div>
161
162     [% IF ( trsfitemloop ) %]
163         <div class="yui-g">
164                 <table>
165             <caption>Transferred items</caption>
166             <tr>
167                 <th>Title</th>
168                 <th>Author</th>
169                 <th>Barcode</th>
170                 <th>Shelving location</th>
171                 <th>Call number</th>
172                 <th>Type</th>
173                 <th>To</th>
174             </tr>
175             [% FOREACH trsfitemloo IN trsfitemloop %]
176                 <tr>
177                     <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.title |html %]</a></td>
178                     <td>[% trsfitemloo.author %]</td>
179                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber %]&amp;itemnumber=[% trsfitemloo.itemnumber %]#item[% trsfitemloo.itemnumber %]">[% trsfitemloo.barcode %]</a></td>
180                     <td>[% trsfitemloo.location %]</td>
181                     <td>[% trsfitemloo.itemcallnumber %]</td>
182                     <td>[% trsfitemloo.ccode %]</td>
183                     <td>[% trsfitemloo.tobrname %]</td>
184                 </tr>
185             [% END %]
186         </table>
187                 </div>
188     [% END %]
189         
190         
191 [% END %]
192
193 </div>
194 [% INCLUDE 'intranet-bottom.inc' %]