Bug 22468: Standardize on labelling ccode table columns as Collections
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / branchtransfers.tt
index 097089a..3e7f9e9 100644 (file)
@@ -1,43 +1,53 @@
+[% USE Koha %]
+[% USE Branches %]
+[% USE ItemTypes %]
+[% USE AuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Transfers</title>
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
-<body>
+<body id="circ_branchtransfers" class="circ">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'circ-search.inc' %]
 
 <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>
 
-<div id="doc" class="yui-t7">
-   <div id="bd">
+<div class="main container-fluid">
+    <div class="row">
+        [% IF Koha.Preference('CircSidebar') %]
+            <div class="col-sm-10 col-sm-push-2">
+        [% ELSE %]
+            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
+        [% END %]
+            <main>
 
 [% IF ( found ) %]
-   <div class="yui-g"> <h3>Reserve Found</h3>
+    <h3>Reserve found</h3>
     <table>
         <caption>
             [% IF ( reserved ) %]
-                Reserve found for [% name %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowernumber %]</a>).
+                Reserve found for [% name | html %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% borrowernumber | html %]</a>).
             [% END %]
             [% IF ( waiting ) %]
-                Item is marked waiting at [% branchname %] for [% name %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowernumber %]</a>).
+                Item is marked waiting at [% branchname | html %] for [% name | html %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% borrowernumber | html %]</a>).
             [% END %]
         </caption>
         <tr>
             <th>
-                [% IF ( reserved ) %]Set reserve to waiting and transfer book to [% branchname %]: [% END %]
+                [% IF ( reserved ) %]Set reserve to waiting and transfer book to [% branchname | html %]: [% END %]
                 [% IF ( waiting ) %]Cancel reservation and then attempt transfer: [% END %]
             </th>
             <td>
                 <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
                     [% FOREACH trsfitemloo IN trsfitemloop %]
-                        <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
-                        <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
-                        <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
+                        <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
+                        <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
+                        <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
                     [% END %]
-                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
-                    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+                    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
+                    <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
                     [% IF ( waiting ) %]
-                        <input type="hidden" name="barcode" value="[% barcode %]" />
+                        <input type="hidden" name="barcode" value="[% barcode | html %]" />
                         <input type="hidden" name="request" value="KillWaiting" />
                         <input type="submit" value="Cancel" />
                     [% END %]
                     <td>
                         <form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
                             [% FOREACH trsfitemloo IN trsfitemloop %]
-                                <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
-                                <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
-                                <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
+                                <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
+                                <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
+                                <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
                             [% END %]
-                            <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
-                            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
-                            <input type="hidden" name="tobranchcd" value="[% tobranchcd %]" />
-                            <input type="hidden" name="barcode" value="[% barcode %]" />
+                            <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
+                            <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
+                            <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
+                            <input type="hidden" name="barcode" value="[% barcode | html %]" />
                             <input type="hidden" name="request" value="KillReserved" />
                             <input type="submit" value="Cancel" />
                         </form>
                     <th>Ignore and return to transfers: </th>
                         <td>
                             <form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
-                                <input type="hidden" name="tobranchcd" value="[% tobranchcd %]" />
+                                <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
                                 <input type="hidden" name="barcode" />
                                 [% FOREACH trsfitemloo IN trsfitemloop %]
-                                    <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
-                                    <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
-                                    <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
+                                    <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
+                                    <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
+                                    <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
                                 [% END %]
                                 <input type="submit" value="Ignore" />
                             </form>
                         </td>
                 </tr>
-    </table></div>
+    </table>
 
 [% ELSE %]
                     [% IF ( reqmessage ) %]
                              <li>Reserve cancelled</li>
                          [% END %]
                          [% IF ( setwaiting ) %]
-                             <li>Item should now be waiting at library: [% reqbrchname %]</li>
+                             <li>Item should now be waiting at library: [% reqbrchname | html %]</li>
                          [% END %]
                          </ul>
                     </div>
                             <ul>
                              [% FOREACH errmsgloo IN errmsgloop %]
                               [% IF ( errmsgloo.errbadcode ) %]
-                                  <li>No Item with barcode: [% errmsgloo.msg %]</li>
+                                  <li>No Item with barcode: [% errmsgloo.msg | html %]</li>
                               [% END %]
                               [% IF ( errmsgloo.errispermanent ) %]
-                                  <li>Please return item to home library: [% errmsgloo.msg %]</li>
+                                  <li>Please return item to home library: [% Branches.GetName( errmsgloo.msg ) | html %]</li>
                               [% END %]
                               [% IF ( errmsgloo.errnotallowed ) %]
-                                  <li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
+                                  <li>Transfer is not allowed for:
+                                      <ol>
+                                          [% IF ( Koha.Preference('BranchTransferLimitsType') == 'itemtype' ) %]
+                                              <li>Item type: <b>[% ItemTypes.GetDescription( errmsgloo.code ) | html %]</b></li>
+                                          [% ELSE %]
+                                              <li>Collection: <b>[% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) | html %]</b></li>
+                                          [% END %]
+                                          <li>Destination library: <b>[% Branches.GetName( errmsgloo.tbr ) | html %]</b></li>
+                                      </ol>
+                                  </li>
                               [% END %]
                               [% IF ( errmsgloo.errdesteqholding ) %]
                                   <li>Item is already at destination library.</li>
                               [% END %]
                               [% IF ( errmsgloo.errwasreturned ) %]
-                                  <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
-                                  [% errmsgloo.firstname %] [% errmsgloo.surname %]
-                                  ([% errmsgloo.cardnumber %])</a> and has been returned.</li>
+                                  <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.patron.borrowernumber | uri %]">
+                                  [% errmsgloo.patron.firstname | html %] [% errmsgloo.patron.surname | html %]
+                                  ([% errmsgloo.patron.cardnumber | html %])</a> and has been returned.</li>
                               [% END %]
                           [% END %]
                           </ul>
                        <li>
                 <label for="tobranchcd">Destination library: </label>
                     <select name="tobranchcd" id="tobranchcd">
-                        [% FOREACH branchoptionloo IN branchoptionloop %]
-                                               [% IF ( branchoptionloo.selected ) %]
-                            <option value="[% branchoptionloo.value %]" selected="selected">
-                                               [% ELSE %]
-                            <option value="[% branchoptionloo.value %]">
-                                               [% END %]
-                                [% branchoptionloo.branchname %]
-                            </option>
-                        [% END %]
+                        [% PROCESS options_for_libraries libraries => Branches.all( selected => tobranchcd, unfiltered => 1) %]
                     </select>
             </li>
             <li>
                 <label for="barcode">Enter barcode: </label>
-                <input name="barcode" id="barcode" size="15" class="focus" /> <input type="submit" value="Submit" />
+                <input name="barcode" id="barcode" size="15" class="focus" type="text" /> <input type="submit" value="Submit" />
             </li>
                        </ol>
         </fieldset>
-        <input type="hidden" name="tobranchcd" value="[% tobrancd %]" />
+        <input type="hidden" name="tobranchcd" value="[% tobrancd | html %]" />
         [% FOREACH trsfitemloo IN trsfitemloop %]
-            <input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
-            <input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
-            <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
+            <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" />
+            <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" />
+            <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" />
         [% END %]
-    </form></div>
+    </form>
 </div>
 
     [% IF ( trsfitemloop ) %]
-        <div class="yui-g">
                <table>
-            <caption>Transferred Items</caption>
+            <caption>Transferred items</caption>
             <tr>
-                <th>Title</th>
-                <th>Author</th>
-                <th>Barcode</th>
-                <th>Shelving location</th>
-                <th>Call number</th>
-                <th>Type</th>
-                <th>To</th>
+                <th class="tf-title">Title</th>
+                <th class="tf-author">Author</th>
+                <th class="tf-barcode">Barcode</th>
+                <th class="tf-location">Shelving location</th>
+                <th class="tf-itemcallnumber">Call number</th>
+                <th class="tf-itemtype">Item type</th>
+                <th class="tf-ccode">Collection</th>
+                <th class="tf-destination">Destination</th>
             </tr>
             [% FOREACH trsfitemloo IN trsfitemloop %]
                 <tr>
-                    <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.title |html %]</a></td>
-                    <td>[% trsfitemloo.author %]</td>
-                    <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber %]&amp;itemnumber=[% trsfitemloo.itemnumber %]#item[% trsfitemloo.itemnumber %]">[% trsfitemloo.barcode %]</a></td>
-                    <td>[% trsfitemloo.location %]</td>
-                    <td>[% trsfitemloo.itemcallnumber %]</td>
-                    <td>[% trsfitemloo.ccode %]</td>
-                    <td>[% trsfitemloo.tobrname %]</td>
+                    <td class="tf-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]">[% trsfitemloo.title | html %]</a></td>
+                    <td class="tf-author">[% trsfitemloo.author | html %]</td>
+                    <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>
+                    <td class="tf-location"><span class="shelvingloc">[% trsfitemloo.location | html %]</span></td>
+                    <td class="tf-itemcallnumber">[% trsfitemloo.itemcallnumber | html %]</td>
+                    <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.itemtype ) | html %]</td>
+                    <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) | html %]</td>
+                    <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td>
                 </tr>
             [% END %]
         </table>
-               </div>
     [% END %]
        
        
 [% END %]
 
-</div>
+    </main>
+        </div> <!-- /.col-sm-10.col-sm-push-2 -->
+        [% IF Koha.Preference('CircSidebar') %]
+            <div class="col-sm-2 col-sm-pull-10">
+                <aside>
+                    [% INCLUDE 'circ-nav.inc' %]
+                </aside>
+            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+        [% END %]
+    </div> <!-- /.row -->
+
 [% INCLUDE 'intranet-bottom.inc' %]