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