Bug 7731 [Follow-up] Library should be used instead of branch and site
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
index ddf3144..a27b45f 100644 (file)
@@ -1,48 +1,53 @@
 [% USE KohaDates %]
+[% USE KohaBranchName %]
+
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript">
 //<![CDATA[
 function Dopop(link) {
-    var newin=window.open(link,'popup','width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
+    var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
+    $("#barcode").focus();
 }
-        $(document).ready(function() {
-               $("#exemptcheck").change(function(){
-                       if(this.checked == true) {
-                               $("#barcode").addClass("alert");
-                               $("#exemptfines").show();
-                       } else {
-                               $("#barcode").removeClass("alert");
-                               $("#exemptfines").hide();
-                       }
-                       $("#barcode").focus();
-               });
-               $("#dropboxcheck").change(function(){
-                       if (this.checked == true) {
-                               $("#barcode").addClass("alert");
-                               $("#dropboxmode").show();
-                       } else {
-                               $("#barcode").removeClass("alert");
-                               $("#dropboxmode").hide();
-                       }
-                       $("#barcode").focus();
-               });
-               [% IF ( overduecharges ) %]$("#barcode").focus(function(){
-                       if(($("#exemptcheck").attr("checked") == true)||($("#dropboxcheck").attr("checked") == true)){
-                               $("#barcode").addClass("alert");
-                       } else {
-                               $("#barcode").removeClass("alert");
-                       }
-               });
-               $("#barcode").blur(function(){
-                       $("#barcode").removeClass("alert");
-               });[% END %]
-        });
+$(document).ready(function () {
+    $("#exemptcheck").change(function () {
+        if (this.checked == true) {
+            $("#barcode").addClass("alert");
+            $("#exemptfines").show();
+        } else {
+            $("#barcode").removeClass("alert");
+            $("#exemptfines").hide();
+        }
+        $("#barcode").focus();
+    });
+    $("#dropboxcheck").change(function () {
+        if (this.checked == true) {
+            $("#barcode").addClass("alert");
+            $("#dropboxmode").show();
+        } else {
+            $("#barcode").removeClass("alert");
+            $("#dropboxmode").hide();
+        }
+        $("#barcode").focus();
+    });
+    [% IF(overduecharges) %] $("#barcode").focus(function () {
+        if (($("#exemptcheck").attr("checked") == true) || ($("#dropboxcheck").attr("checked") == true)) {
+            $("#barcode").addClass("alert");
+        } else {
+            $("#barcode").removeClass("alert");
+        }
+    });
+    $("#barcode").blur(function () {
+        $("#barcode").removeClass("alert");
+    });
+    [% END %]
+});
 //]]>
 </script>
 </head>
 <body id="circ_returns" class="circ">
+
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'checkin-search.inc' %]
 
@@ -83,11 +88,11 @@ function Dopop(link) {
 
 
 [% IF ( wrongbranch ) %]
-<div class="dialog alert"><h3>Cannot Check In</h3><p>This item must be checked in at its home library. <strong>NOT CHECKED IN</strong></p>
+<div class="dialog alert"><h3>Cannot check in</h3><p>This item must be checked in at its home library. <strong>NOT CHECKED IN</strong></p>
 </div>
 [% END %]
 <!-- case of a mistake in transfer loop -->
-[% IF ( WrongTransfer ) %]<div id="return2" class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %]</h3><h3><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;">Print slip</a> or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel transfer</a></h3>
+[% IF ( WrongTransfer ) %]<div id="return2" class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt | $KohaBranchName %]</h3><h3><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;">Print slip</a> or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel transfer</a></h3>
 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
@@ -329,7 +334,12 @@ function Dopop(link) {
                         <p class="problem">Item was lost, now found.</p>
                     [% END %]
                     [% IF ( errmsgloo.withdrawn ) %]
-                        <p class="problem">Item is withdrawn.</p>
+                        [% IF BlockReturnOfWithdrawnItems %]
+                           <h3>Cannot Check In</h3>
+                           <p class="problem">Item is withdrawn. <strong>NOT CHECKED IN</strong></p>
+                        [% ELSE %]
+                           <p class="problem">Item is withdrawn.</p>
+                        [% END %]
                     [% END %]
                     [% IF ( errmsgloo.debarred ) %]
                         <p class="problem"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber %]">[% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %] </p>
@@ -379,54 +389,33 @@ function Dopop(link) {
             <div class="yui-u">
             <fieldset id="checkin_options">
                 <legend>Options</legend>
-
-                <ul>
                     [% IF ( overduecharges ) %]
-                    <li>
+                    <p>
                         [% IF ( exemptfine ) %]
                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
                         [% ELSE %]
                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
                         [% END %]
                         <label for="exemptcheck">Forgive overdue charges</label>
-                    </li>
+                    </p>
                     [% END %] <!-- overduecharges -->
-                    <li>
+                    <p>
                         [% IF ( dropboxmode ) %]
                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
                         [% ELSE %]
                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
                         [% END %]
                         <label for="dropboxcheck">Dropbox mode</label>
-                    </li>
-                </ul>
+                    </p>
             </fieldset>
         </div>
     </form>
 </div>
 
-[% IF ( returned ) %]
-<div class="yui-g">    <table>
-        <tr><th>Item information</th><th>Patron information</th></tr>
-        <tr>
-            <td>[% title |html %]</td>
-            <td>
-
-                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riborrowernumber %]">[% riborsurname %], [% ribortitle %] [% riborfirstname %]</a> ([% riborcnum %])
-                [% IF ( flagset ) %]
-                ([% FOREACH flagloo IN flagloop %]
-                [% flagloo.flag %]
-               [% IF ( flagloo.charges ) %] of [% flagloo.chargeamount %] [% END %]
-               ,
-                [% END %])[% END %]
-            </td>
-        </tr>
-    </table>
-[% END %]
 [% IF ( riloop ) %]
     <h2>Checked-in items</h2>
     <table>
-    <tr><th>Due date</th><th>Title</th>        <th>Author</th> <th>Barcode</th><th>Shelving Location</th><th>Call number</th><th>Type</th>     <th>Patron</th><th>Note</th></tr>
+    <tr><th>Due date</th><th>Title</th>        <th>Author</th> <th>Barcode</th><th>Home library</th><th>Holding library</th><th>Shelving location</th><th>Call number</th><th>Type</th>        <th>Patron</th><th>Note</th></tr>
 
         [% FOREACH riloo IN riloop %]
             <tr>
@@ -442,6 +431,8 @@ function Dopop(link) {
                     [% riloo.itemtitle |html %]</a></td>
                        <td>[% riloo.itemauthor %]</td>
             <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
+            <td>[% riloo.homebranch %]</td>
+            <td>[% riloo.holdingbranch %]</td>
             <td>[% riloo.location %]</td>
             <td>[% riloo.itemcallnumber %]</td>
             <td>[% riloo.itemtype %] [% riloo.ccode %]</td>