Bug 5549 Followup: fix suspension in days
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
index a766bcc..038a3c8 100644 (file)
@@ -1,3 +1,4 @@
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Check In [% title |html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -54,8 +55,14 @@ function Dopop(link) {
 
 <div class="yui-g">
 
+[% IF additional_materials %]
+    <div class="dialog message" id="materials">Note about the accompanying materials: <br />
+    [% additional_materials %]
+    </div>
+[% END %]
+
 [% IF ( collectionItemNeedsTransferred ) %]
-       <div class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
+       <div id="rotating-collection" class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
 [% END %]
 
 <!-- Patron has fines -->
@@ -68,9 +75,9 @@ function Dopop(link) {
 
 <!-- Patron has waiting holds -->
 [% IF ( waiting_holds ) %]
-    <div class="dialog alert">
-        <h3>Patron has [% waiting_holds %] hold(s) waiting for pickup.</h3>
-        <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Checkout holds</a>.</p>
+    <div id="awaiting-pickup" class="dialog message">
+        <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
+        <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
     </div>
 [% END %]
 
@@ -80,7 +87,7 @@ function Dopop(link) {
 </div>
 [% END %]
 <!-- case of a mistake in transfer loop -->
-[% IF ( WrongTransfer ) %]<div 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>
+[% 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 ( wborcnum ) %]<h5>Hold for:</h5>
         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
@@ -109,9 +116,9 @@ function Dopop(link) {
 
 [% IF ( soundon ) %]
 <audio src="/intranet-tmpl/prog/sound/ending.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
-[% END %]      
-       
-<div class="dialog message">
+[% END %]
+
+<div id="hold-found1" class="dialog message">
         <h3>Hold Found (item is already waiting):  <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
         <h4>Hold for:</h4>
@@ -150,7 +157,10 @@ function Dopop(link) {
 
     [% IF ( diffbranch ) %]
                <!-- diffbranch -->
-        <div class="dialog message">
+        [% IF ( soundon ) %]
+        <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
+        [% END %]
+        <div id="transfer-needed" class="dialog message">
                <h3>Hold needing transfer found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
                 <h4>Hold for: </h4>
                     <ul>
@@ -187,14 +197,25 @@ function Dopop(link) {
 
     [% IF ( transfer ) %]
     <!-- transfer: item with no reservation, must be returned to its homebranch -->
-       <div class="dialog message">
-         <h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% DEFAULT title="item" |html %]</a> to [% homebranchname %]</h3></div>[% END %]
+       <div id="return1" class="dialog message">
+            <h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title or "item" |html %]</a> to [% homebranchname %]<br/>( <a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;">Print Slip</a> )</h3>
+        </div>
+        [% IF ( soundon ) %]
+        <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
+        [% END %]
+    [% END %]
 
     [% IF ( needstransfer ) %]
        <!-- needstransfer -->
-       <div class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
+        [% IF ( soundon ) %]
+        <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
+        [% END %]
+       <div id="item-transfer" class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
        Transfer Now?<br />
     <form method="post" action="returns.pl" name="mainform" id="mainform">
+    [% IF itemnumber %]
+        <input type="submit" name="dotransfer" value="Yes, Print slip" class="print" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;" />
+    [% END %]
        <input type="submit" name="dotransfer" value="Yes" class="submit" />
        <input type="submit" name="notransfer" value="No" class="submit" />
        <input type="hidden" name="tobranch" value="[% homebranch %]" />
@@ -204,14 +225,17 @@ function Dopop(link) {
        [% FOREACH inputloo IN inputloop %]
        <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
        <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
-       <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.bornum %]" />
+       <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
        [% END %]
        <input type="hidden" name="barcode" value="0" />
        </form>   </div>
-       [% END %]
+    [% END %]
 
     [% IF ( diffbranch ) %]
        <!-- diffbranch -->
+        [% IF ( soundon ) %]
+        <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
+        [% END %]
         <h3>Item Consigned:</h3>
         <table>
         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
@@ -236,12 +260,12 @@ function Dopop(link) {
     <!-- case of simple return no issue or transfer but with a reservation  -->
     [% IF ( reserved ) %]
        <!--  reserved  -->
-       
-[% IF ( soundon ) %]
-<audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
-[% END %]
-       
-       <div class="dialog message">
+
+        [% IF ( soundon ) %]
+        <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
+        [% END %]
+
+       <div id="hold-found2" class="dialog message">
          <h3>Hold Found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
         <h5>Hold for:</h5>
@@ -298,12 +322,18 @@ function Dopop(link) {
                     [% IF ( errmsgloo.notissued ) %]
                         <p class="problem">Not checked out.</p>
                     [% END %]
+                    [% IF ( errmsgloo.localuse) %]
+                        <p class="problem">Local Use recorded</p>
+                    [% END %]
                     [% IF ( errmsgloo.waslost ) %]
                         <p class="problem">Item was lost, now found.</p>
                     [% END %]
                     [% IF ( errmsgloo.withdrawn ) %]
                         <p class="problem">Item is withdrawn.</p>
                     [% 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>
+                    [% END %]
             [% END %]
 [% IF ( soundon ) %]
 <audio src="/intranet-tmpl/prog/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
@@ -324,7 +354,7 @@ function Dopop(link) {
     </div>
 </div>
        <div class="yui-g">
-    <form method="post" action="/cgi-bin/koha/circ/returns.pl" >
+    <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
     <div class="yui-u first">
             <fieldset>
        <legend>Check In</legend>
@@ -396,7 +426,7 @@ function Dopop(link) {
 [% IF ( riloop ) %]
     <h2>Checked-In items</h2>
     <table>
-       <tr><th>Due Date</th><th>Title</th>     <th>Author</th> <th>Barcode</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>Shelving Location</th><th>Call Number</th><th>Type</th>     <th>Patron</th><th>Note</th></tr>
 
         [% FOREACH riloo IN riloop %]
             <tr>
@@ -412,6 +442,7 @@ 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.location %]</td>
             <td>[% riloo.itemcallnumber %]</td>
             <td>[% riloo.itemtype %] [% riloo.ccode %]</td>
                        <td>[% IF ( riloo.duedate ) %]