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