Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
index ce18462..8bad09d 100644 (file)
@@ -5,31 +5,28 @@
 [% USE ColumnsSettings %]
 [% USE ItemTypes %]
 [% USE Price %]
-[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
-   [% SET exports_enabled = 1 %]
-[% END %]
 [% USE AuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% SET destination = "circ" %]
 <title>Koha &rsaquo; Circulation
 [% IF borrowernumber and borrower%]
-  &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
+  &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %]
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'calendar.inc' %]
 
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
 [% INCLUDE 'strings.inc' %]
 [% INCLUDE 'datatables.inc' %]
 [% INCLUDE 'columns_settings.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
 [% INCLUDE 'timepicker.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
+<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
+<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
+<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
 <script type="text/javascript">
 //<![CDATA[
 /* Set some variable needed in circulation.js */
@@ -38,7 +35,7 @@ var interface = "[% interface %]";
 var theme = "[% theme %]";
 var borrowernumber = "[% borrowernumber %]";
 var branchcode = "[% branch %]";
-var exports_enabled = "[% exports_enabled %]";
+var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
 var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
 var script = "circulation";
@@ -97,6 +94,13 @@ $(document).ready(function() {
         }
     });
 
+    if ( $('#clubs-tab').length ) {
+        $('#clubs-tab-link').on('click', function() {
+            $('#clubs-tab').text(_("Loading..."));
+            $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
+        });
+    }
+
     [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
         // listen submit to trigger qslip on empty checkout
         $('#mainform').bind('submit',function() {
@@ -241,7 +245,11 @@ $(document).ready(function() {
 [% END %]
 
 [% IF ( PATRON_CANT ) %]
-    <li>This patron can't check out this item per library circulation policy</li>
+    <li>This patron can't check out this item per library circulation policy.</li>
+[% END %]
+
+[% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
+    <li>No circulation rule is defined for this patron and itemtype combination.</li>
 [% END %]
 
 [% IF ( NOT_FOR_LOAN_FORCING ) %]
@@ -279,7 +287,7 @@ $(document).ready(function() {
 [% END %]
 
 [% IF PREVISSUE %]
-    <li>This item has previously been checked out to this patron.  Check out anyway?</li>
+    <li>Patron has previously checked out this title: <b>[% biblio.title %] [% IF biblio.author %] by [% biblio.author %][% END %]</b>. Check out anyway?</li>
 [% END %]
 
 [% IF BIBLIO_ALREADY_ISSUED %]
@@ -363,6 +371,7 @@ $(document).ready(function() {
     <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
     [% END %]
     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
+    <input type="hidden" name="auto_renew" value="[% auto_renew %]" />
 </form>
 [% END %]
 
@@ -430,34 +439,24 @@ $(document).ready(function() {
 
         [% IF ( UNKNOWN_BARCODE ) %]
             <li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
-           [% IF ( fast_cataloging ) %]
-               [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
-            <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]">Fast cataloging</a>
-               [% END %]
-           [% END %]
 
-        [% IF ( FALLBACK ) %]
-            [% IF options %]
-                <br />The following items were found by searching:
-                [% FOREACH book IN options %]
-                    <br />
-                    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
-                    [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
-                        <input type="hidden" name="restoreduedatespec" />
-                        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
-                        <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
-                        <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
-                        <input type="hidden" name="branch" value="[% branch %]" />
-                        <input type="hidden" name="barcode" value="[% book.barcode %]" />
-                        <button type="submit" name="x"><i class="fa fa-check"></i> Check out [% book.barcode %]: [% book.title %]</button>
-                    </form>
-                [% END %]
-            [% ELSE %]
-                <br />No items were found by searching.
-            [% END %]
-        [% END %]
+                <div>
+                    [% IF ( FALLBACK ) %]
+                        [% IF options %]
+                            <button type="button" class="approve" data-toggle="modal" data-target="#itemSearchFallback"><i class="fa fa-search"></i> Show matching titles</button>
+                        [% ELSE %]
+                            <div>No items were found by searching.</div>
+                        [% END %]
+                    [% END %]
 
-     </li>
+                    [% IF ( fast_cataloging ) %]
+                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
+                            <a class="approve" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]"><i class="fa fa-plus"></i> Add record using fast cataloging</a>
+                        [% END %]
+                    [% END %]
+                </div>
+
+            </li>
         [% END %]
 
         [% IF ( NOT_FOR_LOAN ) %]
@@ -537,6 +536,53 @@ $(document).ready(function() {
         [% END %]
 
 </div></div>
+
+        [% IF ( FALLBACK ) %]
+            [% IF options %]
+
+                <!-- Modal -->
+                <div class="modal" id="itemSearchFallback" tabindex="-1" role="dialog" aria-labelledby="itemSearchFallbackLabel">
+                    <div class="modal-dialog modal-wide" role="document">
+                        <div class="modal-content">
+                            <div class="modal-header">
+                                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                                <h3 id="itemSearchFallbackLabel"><h3>Barcode not found. The following items were found by searching:</h3>
+                            </div>
+                            <div class="modal-body">
+                                <table class="table_borrowers">
+                                    [% FOREACH book IN options %]
+                                        <tr>
+                                            <td>
+                                                <a class="popup" target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber %]">[% book.title %]</a>
+                                                [% book.barcode %]
+                                            </td>
+                                            <td>
+                                                <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
+                                                    [% IF (forceallow) %]
+                                                        <input type="hidden" name="forceallow" value="1">
+                                                    [% END %]
+                                                    <input type="hidden" name="restoreduedatespec" />
+                                                    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+                                                    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
+                                                    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
+                                                    <input type="hidden" name="branch" value="[% branch %]" />
+                                                    <input type="hidden" name="barcode" value="[% book.barcode %]" />
+                                                    <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
+                                                </form>
+                                            </td>
+                                        </tr>
+                                    [% END %]
+                                </table>
+                            </div>
+                            <div class="modal-footer">
+                                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            [% END %]
+        [% END %]
+
 [% ELSE %]
   [% IF (forceallow) %]
       <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
@@ -591,14 +637,18 @@ No patron matched <span class="ex">[% message | html %]</span>
 
     <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
 
-       <div class="hint">Enter item barcode:</div>
+        [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
+            <div class="hint">Enter item barcode or keyword:</div>
+        [% ELSE %]
+            <div class="hint">Enter item barcode:</div>
+        [% END %]
 
     [% IF NEEDSCONFIRMATION %]
         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
     [% ELSE %]
         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
     [% END %]
-    <button type="submit" class="btn">Check out</button>
+    <button type="submit" class="btn btn-default">Check out</button>
 
     <div id="show-checkout-settings">
         <a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
@@ -621,7 +671,7 @@ No patron matched <span class="ex">[% message | html %]</span>
                     [% ELSE %]
                         <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
                     [% END %]
-                    <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
+                    <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
                 </div>
             [% END %]
         [% END %]
@@ -631,7 +681,7 @@ No patron matched <span class="ex">[% message | html %]</span>
                 [% IF NEEDSCONFIRMATION %]
                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
                 [% ELSE %]
-                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" />
+                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
                 [% END %]
 
                 <label for="auto_renew">Automatic renewal</label>
@@ -646,9 +696,9 @@ No patron matched <span class="ex">[% message | html %]</span>
                         [% END %]
                     [% ELSE %]
                         [% IF override_high_holds %]
-                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" checked="checked" />
+                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
                         [% ELSE %]
-                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" />
+                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
                         [% END %]
                     [% END %]
                     <label for="override_high_holds">Don't decrease checkout length based on holds</label>
@@ -665,7 +715,7 @@ No patron matched <span class="ex">[% message | html %]</span>
                         <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
                     </div>
                 [% ELSE %]
-                    <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
+                    <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
                 [% END %]
             </div>
         [% END %]
@@ -722,7 +772,7 @@ No patron matched <span class="ex">[% message | html %]</span>
 
                    [% IF ( has_modifications ) %]
                     <li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
-                            [% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
+                            [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
                                     <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
                             [% END %]
                    </li>
@@ -774,10 +824,10 @@ No patron matched <span class="ex">[% message | html %]</span>
                     </i>
                    [% END %]
                    <br/>
-                   <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
+                   <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
                     [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
                         <span class="override_debarment">
-                            <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override restriction temporarily</a>
+                            <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
                         </span>
                     [% END %]
                </li>
@@ -787,14 +837,12 @@ No patron matched <span class="ex">[% message | html %]</span>
             [% END %]
 
             [% IF ( charges ) %]
-                [% INCLUDE 'blocked-fines.inc'
-                    fines = chargesamount
-                %]
+                [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
             [% END %]
 
             [% IF ( charges_guarantees ) %]
                 <li>
-                    <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees %].
+                    <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
                         [% IF ( charges_guarantees_is_blocker ) %]
                             <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
                         [% END %]
@@ -825,8 +873,8 @@ No patron matched <span class="ex">[% message | html %]</span>
 
                                 <br/>
                                 [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
-                                    [% SET waiting_expires_on = w.waiting_expires_on %]
-                                    Waiting at [% w.branch.branchname | html %] [% IF waiting_expires_on %] until [% waiting_expires_on | $KohaDates %] [% END %]
+                                    [% SET expires_on = w.expirationdate %]
+                                    Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
                                 </strong>
                             </li>
                         </ul>
@@ -846,26 +894,27 @@ No patron matched <span class="ex">[% message | html %]</span>
     <div id="messages" class="circmessage">
         <h4>Messages:</h4>
         <ul>
-            [% FOREACH message IN librarian_messages %]
+            [% FOREACH message IN messages %]
                 <li>
-                    <span class="circ-hlt">
+                    [% IF(message.message_type == "L") %]
+                        <span class="circ-hlt">
+                    [% ELSE %]
+                        <span>
+                    [% END %]
                         [% message.message_date | $KohaDates %]
                         [% Branches.GetName( message.branchcode ) %]
-                        <i>"[% message.message %]"</i>
+                        [% IF message.manager_id %]
+                            ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
+                        [% END %]
+                        <i>"[% message.message | html %]"</i>
                     </span>
                     [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
-                        [<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>]
+                        <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
                     [% END %]
                 </li>
             [% END %]
-            [% FOREACH message IN patron_messages %]
-                <li><span class="">[% message.message_date | $KohaDates %] [% Branches.GetName( message.branchcode )%] <i>"[% message.message %]"</i></span>
-                [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
-                    [<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]"><i class="fa fa-trash"></i> Delete</a>]
-                [% END %]</li>
-            [% END %]
         </ul>
-        <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
+        <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
     </div>
 
 </div>
@@ -892,8 +941,26 @@ No patron matched <span class="ex">[% message | html %]</span>
         [% ELSE %]
             <a href="#reserves" id="holds-tab">0 Holds</a>
         [% END %]
+    </li>
+
+    [% IF Koha.Preference('ArticleRequests') %]
+        <li>
+            <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
+        </li>
+    [% END %]
+
+    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count %] Restrictions</a></li>
+
+    [% SET enrollments = patron.get_club_enrollments(1) %]
+    [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
+    [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
+        <li>
+            <a id="clubs-tab-link" href="#clubs-tab">
+                Clubs ([% enrollments.count %]/[% enrollable.count %])
+            </a>
+        </li>
+    [% END %]
 
-    <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
 </ul>
 
 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
@@ -923,6 +990,12 @@ No patron matched <span class="ex">[% message | html %]</span>
     </div>
 [% END %]
 
+[% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
+    <div id="clubs-tab">
+        Loading...
+    </div>
+[% END %]
+
 [% INCLUDE borrower_debarments.inc %]
 
 <div id="reserves">
@@ -939,7 +1012,7 @@ No patron matched <span class="ex">[% message | html %]</span>
                     <th>Pickup at</th>
                     <th>Expiration</th>
                     <th>Priority</th>
-                    <th>Delete?</th>
+                    <th>Cancel?</th>
                     <th>Suspend?</th>
                 </tr>
             </thead>
@@ -950,16 +1023,16 @@ No patron matched <span class="ex">[% message | html %]</span>
         </fieldset>
     </form>
 
-    [% IF SuspendHoldsIntranet %]
+    [% IF Koha.Preference('SuspendHoldsIntranet') %]
     <fieldset class="action">
         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
             <input type="hidden" name="from" value="circ" />
             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
             <input type="submit" value="Suspend all holds" />
 
-            [% IF AutoResumeSuspendedHolds %]
+            [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
             <label for="suspend_until">until</label>
-            <input type="text" size="10" id="suspend_until" name="suspend_until datepicker" />
+            <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker"/>
             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
              [% END %]
         </form>
@@ -980,20 +1053,38 @@ No patron matched <span class="ex">[% message | html %]</span>
 [% END %]
 </div> <!-- reservesloop -->
 
+[% IF Koha.Preference('ArticleRequests') %]
+    [% INCLUDE 'patron-article-requests.inc' %]
+[% END %]
+
 [% ELSIF borrowernumber %]
     <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
 [% END %] <!-- borrowernumber and borrower-->
 </div></div>
 [% END %]
-
+[% IF Koha.Preference('CircSidebar') %]
+[% UNLESS ( borrowers ) %]
+    [% IF not( borrowernumber and borrower ) %]
+        <div class="yui-b noprint">
+            [% INCLUDE 'circ-nav.inc' %]
+        </div>
+    [% END %]
+[% END %]
+[% END %]
 </div>
 </div>
-[% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]<div class="yui-b">
-[% INCLUDE 'circ-menu.inc' %]
-</div>[% END %][% END %]
+[% UNLESS ( borrowers ) %]
+    [% IF borrowernumber and borrower %]
+        <div class="yui-b">
+            [% INCLUDE 'circ-menu.inc' %]
+        </div>
+    [% END %]
+[% END %]
 </div>
 <!-- Modal -->
-<div id="barcodeSubmittedModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
+<div id="barcodeSubmittedModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
+    <div class="modal-dialog">
+    <div class="modal-content">
     <div class="modal-header">
         <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
     </div>
@@ -1001,5 +1092,7 @@ No patron matched <span class="ex">[% message | html %]</span>
     <div class="modal-body">
         <p>You have already submitted a barcode, please wait for the checkout to process...</p>
     </div>
+    </div>
+    </div>
 </div>
 [% INCLUDE 'intranet-bottom.inc' %]