Bug 10300: (follow-up) add controls on transfers page
[koha.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.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                     [% IF ( waiting ) %]
50                         <input type="hidden" name="barcode" value="[% barcode | html %]" />
51                         <input type="hidden" name="request" value="KillWaiting" />
52                         <input type="submit" value="Cancel" />
53                     [% END %]
54                     [% IF ( reserved ) %]
55                         <input type="hidden" name="request" value="SetWaiting" />
56                         <input type="submit" value="Waiting" />
57                     [% END %]
58                 </form>
59             </td>
60         </tr>
61             [% IF ( reserved ) %]
62                 <tr>
63                     <th>Cancel reservation and then attempt transfer:</th>
64                     <td>
65                         <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
66                             [% FOREACH trsfitemloo IN trsfitemloop %]
67                                 <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
68                                 <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
69                                 <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
70                             [% END %]
71                             <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
72                             <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
73                             <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
74                             <input type="hidden" name="barcode" value="[% barcode | html %]" />
75                             <input type="hidden" name="request" value="KillReserved" />
76                             <input type="submit" value="Cancel" />
77                         </form>
78                     </td>
79                 </tr>
80             [% END %]
81                 <tr>
82                     <th>Ignore and return to transfers: </th>
83                         <td>
84                             <form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
85                                 <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
86                                 <input type="hidden" name="barcode" />
87                                 [% FOREACH trsfitemloo IN trsfitemloop %]
88                                     <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
89                                     <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
90                                     <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
91                                 [% END %]
92                                 <input type="submit" value="Ignore" />
93                             </form>
94                         </td>
95                 </tr>
96     </table>
97
98 [% ELSE %]
99                     [% IF ( reqmessage ) %]
100                      <div class="dialog message">
101                         <ul>
102                          [% IF ( cancelled ) %]
103                              <li>Reserve cancelled</li>
104                          [% END %]
105                          [% IF ( setwaiting ) %]
106                              <li>Item should now be waiting at library: [% reqbrchname | html %]</li>
107                          [% END %]
108                          </ul>
109                     </div>
110                      [% END %]
111
112                      [% IF ( errmsgloop ) %]
113                         <div class="dialog message">
114                             <ul>
115                              [% FOREACH errmsgloo IN errmsgloop %]
116                               [% IF ( errmsgloo.errbadcode ) %]
117                                   <li>No Item with barcode: [% errmsgloo.msg | html %]</li>
118                               [% END %]
119                               [% IF ( errmsgloo.errispermanent ) %]
120                                   <li>Please return item to home library: [% Branches.GetName( errmsgloo.msg ) | html %]</li>
121                               [% END %]
122                               [% IF ( errmsgloo.errnotallowed ) %]
123                                   <li>Transfer is not allowed for:
124                                       <ol>
125                                           [% IF ( Koha.Preference('BranchTransferLimitsType') == 'itemtype' ) %]
126                                               <li>Item type: <b>[% ItemTypes.GetDescription( errmsgloo.code ) | html %]</b></li>
127                                           [% ELSE %]
128                                               <li>Collection code: <b>[% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) | html %]</b></li>
129                                           [% END %]
130                                           <li>Destination library: <b>[% Branches.GetName( errmsgloo.tbr ) | html %]</b></li>
131                                       </ol>
132                                   </li>
133                               [% END %]
134                               [% IF ( errmsgloo.errdesteqholding ) %]
135                                   <li>Item is already at destination library.</li>
136                               [% END %]
137                               [% IF ( errmsgloo.errwasreturned ) %]
138                                   <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.patron.borrowernumber | uri %]">
139                                   [% errmsgloo.patron.firstname | html %] [% errmsgloo.patron.surname | html %]
140                                   ([% errmsgloo.patron.cardnumber | html %])</a> and has been returned.</li>
141                               [% END %]
142                           [% END %]
143                           </ul>
144                             </div>
145                         [% END %]
146
147 <div id="branchtransfers">
148     <form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
149         <fieldset class="brief">
150             <legend>Transfer</legend>
151             <ol>
152                         <li>
153                 <label for="tobranchcd">Destination library: </label>
154                     <select name="tobranchcd" id="tobranchcd">
155                         [% PROCESS options_for_libraries libraries => Branches.all( selected => tobranchcd, unfiltered => 1) %]
156                     </select>
157             </li>
158             <li>
159                 <label for="barcode">Enter barcode: </label>
160                 <input name="barcode" id="barcode" size="15" class="focus" type="text" /> <input type="submit" value="Submit" />
161             </li>
162                         </ol>
163         </fieldset>
164         <input type="hidden" name="tobranchcd" value="[% tobrancd | html %]" />
165         [% FOREACH trsfitemloo IN trsfitemloop %]
166             <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
167             <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
168             <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
169         [% END %]
170     </form>
171 </div>
172
173     [% IF ( trsfitemloop ) %]
174                 <table>
175             <caption>Transferred items</caption>
176             <tr>
177                 <th class="tf-title">Title</th>
178                 <th class="tf-author">Author</th>
179                 <th class="tf-barcode">Barcode</th>
180                 <th class="tf-location">Shelving location</th>
181                 <th class="tf-itemcallnumber">Call number</th>
182                 <th class="tf-itemtype">Item type</th>
183                 <th class="tf-ccode">Collection code</th>
184                 <th class="tf-destination">Destination</th>
185             </tr>
186             [% FOREACH trsfitemloo IN trsfitemloop %]
187                 <tr>
188                     <td class="tf-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]">[% trsfitemloo.title | html %]</a></td>
189                     <td class="tf-author">[% trsfitemloo.author | html %]</td>
190                     <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]&amp;itemnumber=[% trsfitemloo.itemnumber | uri %]#item[% trsfitemloo.itemnumber | uri %]">[% trsfitemloo.barcode | html %]</a></td>
191                     <td class="tf-location"><span class="shelvingloc">[% trsfitemloo.location | html %]</span></td>
192                     <td class="tf-itemcallnumber">[% trsfitemloo.itemcallnumber | html %]</td>
193                     <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.itemtype ) | html %]</td>
194                     <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) | html %]</td>
195                     <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td>
196                 </tr>
197             [% END %]
198         </table>
199     [% END %]
200         
201         
202 [% END %]
203
204     </main>
205         </div> <!-- /.col-sm-10.col-sm-push-2 -->
206         [% IF Koha.Preference('CircSidebar') %]
207             <div class="col-sm-2 col-sm-pull-10">
208                 <aside>
209                     [% INCLUDE 'circ-nav.inc' %]
210                 </aside>
211             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
212         [% END %]
213     </div> <!-- /.row -->
214
215 [% INCLUDE 'intranet-bottom.inc' %]