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