Bug 19532: Recalls on intranet
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
index 7e62d7a..2f67da1 100644 (file)
                                         Please confirm that the accompanying materials are present: [% ADDITIONAL_MATERIALS | html %]
                                     </li>
                                 [% END %]
+
+                                [% IF RECALLED %]
+                                    [% IF RECALLED.waiting %]
+                                        <li>Item <i>[% RECALLED.biblio.title | html %]</i> ([% RECALLED.item.barcode | html %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% RECALLED.borrowernumber | uri %]">[% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]</a> ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.branchcode ) | html %] since [% RECALLED.waitingdate | $KohaDates %]</li>
+                                    [% ELSIF RECALLED.requested or RECALLED.overdue %]
+                                        <li>Item <i>[% RECALLED.biblio.title | html %]</i> [% IF RECALLED.item %]([% RECALLED.item.barcode | html %])[% END %] has been recalled by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% RECALLED.borrowernumber | uri %]">[% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]</a> ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.branchcode ) | html %] since [% RECALLED.recalldate | $KohaDates %]</li>
+                                    [% END %]
+                                [% END %]
+
                             </ul>
 
                             [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
                                         </p>
                                     [% END %]
 
+                                    [% IF ( RECALLED ) %]
+                                        <p>
+                                            <label for="cancelrecall">Cancel recall</label>
+                                            <input type="radio" value="cancel" name="cancel_recall" id="cancelrecall" />
+                                            <input type="hidden" value="[% RECALLED.recall_id | html %]" name="recall_id" />
+                                        </p>
+                                        [% IF RECALLED.waiting %]
+                                            <p>
+                                                <label for="revertrecall">Revert waiting status</label>
+                                                <input type="radio" value="revert" name="cancel_recall" id="revertrecall" checked="checked"/>
+                                                <input type="hidden" value="[% RECALLED.recall_id | html %]" name="recall_id" />
+                                            </p>
+                                        [% END %]
+                                    [% END %]
+
                                     <input type="hidden" name="barcode" value="[% barcode | html %]" />
                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
                                     <input type="hidden" name="issueconfirmed" value="1" />
                                 </form>
                             [% END %]
 
+                            [% IF ( RECALLED ) %]
+                                <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
+                                    <button class="print" type="submit" onclick="Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% RECALLED.recall_id | html %]');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
+                                </form>
+                            [% END %]
+
                             <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
                                 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
                                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
                                 [% END %]
                             </form>
 
-                            [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
+                            [% IF ( RESERVED || ISSUED_TO_ANOTHER || RECALLED ) && (CAN_user_reserveforothers_place_holds ) %]
                                 [% UNLESS noissues %]
                                     <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber | html %]&borrowernumber=[% patron.borrowernumber | html %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
                                 [% END %]
                                 [% IF ( USERBLOCKEDOVERDUE ) %]
                                     <li>Checkouts are BLOCKED because patron has overdue items.</li>
                                 [% END %]
+
+                                [% IF ( RECALLED_INTRANSIT ) %]
+                                    <li>Item has been recalled and is in transit for pickup at [% Branches.GetName( RECALLED_INTRANSIT ) | html %].</li>
+                                [% END %]
                                 </ul>
 
                                 [% IF (forceallow) %]
                             [% END %]
                         </li>
 
+                        [% IF Koha.Preference('UseRecalls') %]
+                            <li>
+                                <a href="#recalls" id="recalls-tab">
+                                    [% recalls.count | html %] Recalls
+                                </a>
+                            </li>
+                        [% END %]
+
                         [% IF Koha.Preference('ArticleRequests') %]
                             [% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %]
                             <li>
                         [% END # /IF holds_count %]
                     </div> <!-- /#reserves -->
 
+                    [% IF Koha.Preference('UseRecalls') %]
+                        <div id="recalls">
+                            [% INCLUDE 'recalls.inc' %]
+                        </div>
+                    [% END %]
+
                     [% IF Koha.Preference('ClaimReturnedLostValue') %]
                         [% INCLUDE 'patron-return-claims.inc' %]
                     [% END %]
     </script>
     [% INCLUDE 'str/members-menu.inc' %]
     [% Asset.js("js/members-menu.js") | $raw %]
+    [% Asset.js("js/recalls.js") | $raw %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]