Bug 23695: (QA follow-up) Fix Copy/Paste
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / branchtransfers.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE ItemTypes %]
4 [% USE AuthorisedValues %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Circulation &rsaquo; Transfers</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9 <body id="circ_branchtransfers" class="circ">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'circ-search.inc' %]
12
13 <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>
14
15 <div class="main container-fluid">
16     <div class="row">
17         [% IF Koha.Preference('CircSidebar') %]
18             <div class="col-sm-10 col-sm-push-2">
19         [% ELSE %]
20             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
21         [% END %]
22             <main>
23
24 [% IF ( found ) %]
25     <h3>Reserve found</h3>
26     <table>
27         <caption>
28             [% IF ( reserved ) %]
29                 Reserve found for [% name | html %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% borrowernumber | html %]</a>).
30             [% END %]
31             [% IF ( waiting ) %]
32                 Item is marked waiting at [% branchname | html %] for [% name | html %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% borrowernumber | html %]</a>).
33             [% END %]
34         </caption>
35         <tr>
36             <th>
37                 [% IF ( reserved ) %]Set reserve to waiting and transfer book to [% branchname | html %]: [% END %]
38                 [% IF ( waiting ) %]Cancel reservation and then attempt transfer: [% END %]
39             </th>
40             <td>
41                 <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
42                     [% FOREACH trsfitemloo IN trsfitemloop %]
43                         <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
44                         <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
45                         <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
46                     [% END %]
47                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
48                     <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
49                     <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
50                     [% IF ( waiting ) %]
51                         <input type="hidden" name="barcode" value="[% barcode | html %]" />
52                         <input type="hidden" name="request" value="KillWaiting" />
53                         <input type="submit" value="Cancel" />
54                     [% END %]
55                     [% IF ( reserved ) %]
56                         <input type="hidden" name="request" value="SetWaiting" />
57                         <input type="submit" value="Waiting" />
58                     [% END %]
59                 </form>
60             </td>
61         </tr>
62             [% IF ( reserved ) %]
63                 <tr>
64                     <th>Cancel reservation and then attempt transfer:</th>
65                     <td>
66                         <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
67                             [% FOREACH trsfitemloo IN trsfitemloop %]
68                                 <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
69                                 <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
70                                 <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
71                             [% END %]
72                             <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
73                             <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
74                             <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
75                             <input type="hidden" name="frombranchcd" value="[% frombranchcd | html %]" />
76                             <input type="hidden" name="barcode" value="[% barcode | html %]" />
77                             <input type="hidden" name="request" value="KillReserved" />
78                             <input type="submit" value="Cancel" />
79                         </form>
80                     </td>
81                 </tr>
82             [% END %]
83                 <tr>
84                     <th>Ignore and return to transfers: </th>
85                         <td>
86                             <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
87                                 <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
88                                 <input type="hidden" name="barcode" />
89                                 [% FOREACH trsfitemloo IN trsfitemloop %]
90                                     <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
91                                     <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
92                                     <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
93                                 [% END %]
94                                 <input type="submit" value="Ignore" />
95                             </form>
96                         </td>
97                 </tr>
98     </table>
99
100 [% ELSE %]
101                     [% IF ( reqmessage ) %]
102                      <div class="dialog message">
103                         <ul>
104                          [% IF ( cancelled ) %]
105                              <li>Reserve cancelled</li>
106                          [% END %]
107                          [% IF ( setwaiting ) %]
108                              <li>Item should now be waiting at library: [% reqbrchname | html %]</li>
109                          [% END %]
110                          </ul>
111                     </div>
112                      [% END %]
113
114                      [% IF ( errmsgloop ) %]
115                         <div class="dialog message">
116                             <ul>
117                              [% FOREACH errmsgloo IN errmsgloop %]
118                               [% IF ( errmsgloo.errbadcode ) %]
119                                   <li>No Item with barcode: [% errmsgloo.msg | html %]</li>
120                               [% END %]
121                               [% IF ( errmsgloo.errispermanent ) %]
122                                   <li>Please return item to home library: [% Branches.GetName( errmsgloo.msg ) | html %]</li>
123                               [% END %]
124                               [% IF ( errmsgloo.errnotallowed ) %]
125                                   <li>Transfer is not allowed for:
126                                       <ol>
127                                           [% IF ( Koha.Preference('BranchTransferLimitsType') == 'itemtype' ) %]
128                                               <li>Item type: <b>[% ItemTypes.GetDescription( errmsgloo.code ) | html %]</b></li>
129                                           [% ELSE %]
130                                               <li>Collection: <b>[% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) | html %]</b></li>
131                                           [% END %]
132                                           <li>Originating library: <b>[% Branches.GetName( errmsgloo.fbr ) | html %]</b></li>
133                                           <li>Destination library: <b>[% Branches.GetName( errmsgloo.tbr ) | html %]</b></li>
134                                       </ol>
135                                   </li>
136                               [% END %]
137                               [% IF ( errmsgloo.errdesteqholding ) %]
138                                   <li>Item is already at destination library.</li>
139                               [% END %]
140                               [% IF ( errmsgloo.errwasreturned ) %]
141                                   <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.patron.borrowernumber | uri %]">
142                                   [% errmsgloo.patron.firstname | html %] [% errmsgloo.patron.surname | html %]
143                                   ([% errmsgloo.patron.cardnumber | html %])</a> and has been returned.</li>
144                               [% END %]
145                           [% END %]
146                           </ul>
147                             </div>
148                         [% END %]
149
150 <div id="branchtransfers">
151     <form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
152         <fieldset class="brief">
153             <legend>Transfer</legend>
154             <ol>
155                         <li>
156                 <label for="frombranchcd">Originating library: </label>
157                     <select name="frombranchcd" id="frombranchcd">
158                         <option value="current_holding">Item's holding branch</option>
159                         [% PROCESS options_for_libraries libraries => Branches.all( selected => '', unfiltered => 1) %]
160                     </select>
161             </li>
162             <li>
163                 <label for="tobranchcd">Destination library: </label>
164                     <select name="tobranchcd" id="tobranchcd">
165                         [% PROCESS options_for_libraries libraries => Branches.all( selected => tobranchcd, unfiltered => 1) %]
166                     </select>
167             </li>
168             <li>
169                 <label for="barcode">Enter barcode: </label>
170                 <input name="barcode" id="barcode" size="15" class="focus" type="text" /> <input type="submit" value="Submit" />
171             </li>
172                         </ol>
173         </fieldset>
174         <input type="hidden" name="tobranchcd" value="[% tobrancd | html %]" />
175         [% FOREACH trsfitemloo IN trsfitemloop %]
176             <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" />
177             <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
178             <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
179         [% END %]
180     </form>
181 </div>
182
183     [% IF ( trsfitemloop ) %]
184                 <table>
185             <caption>Transferred items</caption>
186             <tr>
187                 <th class="tf-title">Title</th>
188                 <th class="tf-author">Author</th>
189                 <th class="tf-barcode">Barcode</th>
190                 <th class="tf-location">Shelving location</th>
191                 <th class="tf-itemcallnumber">Call number</th>
192                 <th class="tf-itemtype">Item type</th>
193                 <th class="tf-ccode">Collection</th>
194                 <th class="tf-origin">Origin</th>
195                 <th class="tf-destination">Destination</th>
196             </tr>
197             [% FOREACH trsfitemloo IN trsfitemloop %]
198                 <tr>
199                     <td class="tf-title">
200                         [% INCLUDE 'biblio-default-view.inc' biblionumber = trsfitemloo.item.biblionumber %]
201                         [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio %]
202                         </a>
203                     </td>
204                     <td class="tf-author">[% trsfitemloo.item.biblio.author | html %]</td>
205                     <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.item.biblionumber | uri %]&amp;itemnumber=[% trsfitemloo.item.itemnumber | uri %]#item[% trsfitemloo.item.itemnumber | uri %]">[% trsfitemloo.item.barcode | html %]</a></td>
206                     <td class="tf-location"><span class="shelvingloc">[% AuthorisedValues.GetByCode( 'LOC', trsfitemloo.item.location ) | html %]</span></td>
207                     <td class="tf-itemcallnumber">[% trsfitemloo.item.itemcallnumber | html %]</td>
208                     <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %]</td>
209                     <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.item.ccode ) | html %]</td>
210                     <td class="tf-origin">[% Branches.GetName( trsfitemloo.frombrcd ) | html %]</td>
211                     <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td>
212                 </tr>
213             [% END %]
214         </table>
215     [% END %]
216         
217         
218 [% END %]
219
220     </main>
221         </div> <!-- /.col-sm-10.col-sm-push-2 -->
222         [% IF Koha.Preference('CircSidebar') %]
223             <div class="col-sm-2 col-sm-pull-10">
224                 <aside>
225                     [% INCLUDE 'circ-nav.inc' %]
226                 </aside>
227             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
228         [% END %]
229     </div> <!-- /.row -->
230
231 [% INCLUDE 'intranet-bottom.inc' %]