Bug 7431: Fixes the display of the due date in opac item specific holds.
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-reserve.tt
index 4b72bc9..7e2683a 100644 (file)
@@ -1,4 +1,4 @@
-[% INCLUDE 'doc-head-open.inc' %][% DEFAULT LibraryNameTitle="Koha Online" %] Catalog ›  Placing hold [% title |html %] for [% FOREACH USER_INF IN USER_INFO %][% USER_INF.firstname %] [% USER_INF.surname %][% END %]
+[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha Online" %] Catalog ›  Placing hold [% title |html %] for [% FOREACH USER_INF IN USER_INFO %][% USER_INF.firstname %] [% USER_INF.surname %][% END %]
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'calendar.inc' %]
 <script type="text/javascript">
  });
 // ]]>
 </script>
+<style type="text/css">td ul { padding : 0; } td li { white-space: nowrap; font-size: 90%; list-style-type:none; padding : .3em 0; }</style>
 </head>
 
 <body id="opac-holds">
               </div>
             [% END %]
             [% IF ( too_much_oweing ) %]
-              <div class="dialog alert">
+              <div id="too_much_oweing" class="dialog alert">
                 Sorry, you cannot place holds because you owe [% too_much_oweing %].
               </div>
             [% END %]
             [% IF ( too_many_reserves ) %]
-              <div class="dialog alert">Sorry, you cannot place more than [% too_many_reserves %] holds.
+              <div id="too_many_reserves" class="dialog alert">Sorry, you cannot place more than [% too_many_reserves %] holds.
               </div>
             [% END %]
             [% IF ( bad_biblionumber ) %]
-              <div class="dialog alert">ERROR: No biblio record found for biblionumber [% bad_biblionumber %].</div>
+              <div id="bad_biblionumber" class="dialog alert">ERROR: No biblio record found for biblionumber [% bad_biblionumber %].</div>
             [% END %]
             [% IF ( no_items_selected ) %]
-              <div class="dialog alert">
+              <div id="no_items_selected" class="dialog alert">
                 You must select at least one item.
               </div>
             [% END %]
             [% IF ( no_branch_selected ) %]
-              <div class="dialog alert">
+              <div id="no_branch_selected" class="dialog alert">
                 You must select a library for pickup.
               </div>
             [% END %]
             [% IF ( no_biblionumber ) %]
-              <div class="dialog alert">ERROR: No biblionumber received.</div>
+              <div id="no_biblionumber" class="dialog alert">ERROR: No biblionumber received.</div>
             [% END %]
             [% IF ( bad_data ) %]
-              <div class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
+              <div id="bad_data" class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
             [% END %]
           [% ELSE %]
             [% IF ( none_available ) %]
-                <div class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
+                <div id="none_available" class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
                 </div>
               [% END %]
           [% END %]<!-- NAME="message" -->
                         [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %])
                       [% END %]
                     </h3>[% END %]
+             [% IF (RESERVE_CHARGE) %]
+             <div class="dialog alert" id="reserve_fee">
+               There is a charge of [% RESERVE_CHARGE %] for placing this hold
+             </div>
+             [% END %]
 
             <form action="/cgi-bin/koha/opac-reserve.pl" method="post">
             <input type="hidden" name="place_reserve" value="1"/>
               Calendar.setup(
               {
                 inputField : "reserve_date_[% bibitemloo.biblionumber %]",
-                ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]",
+                ifFormat : "[% DHTMLcalendar_dateformat %]",
                 button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
                 disableFunc : validate[% bibitemloo.biblionumber %],
                 dateStatusFunc : validate[% bibitemloo.biblionumber %]
               );
               //]]>
               </script>
+      <p style="margin:.3em 2em;">
+      <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('reserve_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear Date</a></p>
                 </td>[% END %]
 
                    [% END %]
       Calendar.setup(
         {
           inputField : "expiration_date_[% bibitemloo.biblionumber %]",
-          ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]",
+          ifFormat : "[% DHTMLcalendar_dateformat %]",
           button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
           disableFunc : validate1,
           dateStatusFunc : validate1
       <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear Date</a></p>
     </td>[% END %]
 
-                    [% IF ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %]
+                    [% IF ( bibitemloo.holdable ) %]
+                   <!-- HOLD ABLE -->
+                   [% IF ( OPACItemHolds ) %]
+                   <!-- ITEM HOLDS -->
                                           <td class="place_on_type" style="display:none">
-                                            <table>
-                                              <tr>
-                                                <td>
+                                            <ul>
+                                                <li>
                                                   [% UNLESS ( bibitemloo.holdable ) %]
                                                     <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
                                                            id="reqany_[% bibitemloo.biblionumber %]"
                                                     />
                                                   [% END %]
                                                   <label for="reqany_[% bibitemloo.biblionumber %]">Next available copy</label>
-                                                </td>
-                                              </tr>
-                                              <tr>
-                                                <td>
+                                                </li>
+                                                <li>
                                                   [% UNLESS ( bibitemloo.holdable ) %]
                                                     <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
                                                            id="reqspecific_[% bibitemloo.biblionumber %]"
                                                     />
                                                   [% END %]
                                                   <label for="reqspecific_[% bibitemloo.biblionumber %]">A specific copy</label>
-                                                </td>
-                                              </tr>
-                                            </table>
+                                                </li>
+                                            </ul>
                                           </td>
                                         [% END %][% END %]
 
                         [% IF ( bibitemloo.holdable ) %]
                            [% IF ( choose_branch ) %]
                                           <td>
-                                              <select name="branch" id="branch_[% bibitemloo.biblionumber %]"
-                                                [% UNLESS ( bibitemloo.holdable ) %]disabled="disabled"[% END %] >
-                                                [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
-                                                  [% IF ( branchChoicesLoo.selected ) %]
-                                                    <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
-                                                  [% ELSE %]
-                                                    <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
-                                                  [% END %]
-                                                [% END %]
-                                              </select>
-                                           </td>
+                         [% UNLESS ( bibitemloo.holdable ) %]
+                            <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
+                              [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
+                                [% IF ( branchChoicesLoo.selected ) %]
+                                  <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
+                                [% ELSE %]
+                                  <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
+                                [% END %]
+                              [% END %]
+                          </select>
+                          [% ELSE %]
+                            <select name="branch" id="branch_[% bibitemloo.biblionumber %]">
+                              [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
+                                [% IF ( branchChoicesLoo.selected ) %]
+                                  <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
+                                [% ELSE %]
+                                  <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
+                                [% END %]
+                              [% END %]
+                            </select>
+                          [% END %]
+                       </td>
                            [% END %]
                        [% END %]
                     [% END %]
                   [% IF ( OPACItemHolds ) %]
                   [% IF ( bibitemloo.holdable ) %]
                     <tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
-                      <td colspan="1">
-                      </td>
-                      <td colspan="[% bibitemloo.itemtable_colspan %]">
+                      <td>&nbsp;</td>
+                      <td colspan="[% itemtable_colspan %]">
                         <table>
                           <caption>Select a specific copy:</caption>
                           <tr>
                               <th>Item Type</th>
                             [% END %]
                             <th>Barcode</th>
-                            [% UNLESS ( bibitemloo.singleBranchMode ) %]
+                            [% UNLESS ( singleBranchMode ) %]
                               <th>Home Library</th>
                               <th>Last Location</th>
                             [% END %]
                             <tr class="[% itemLoo.backgroundcolor %]">
                               <td>
                                 [% IF ( itemLoo.available ) %]
-                                  <input type="radio" class="checkitem checkitem_[% itemLoo.biblionumber %]" name="checkitem_[% itemLoo.biblionumber %]"
+                                  <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]"
                                          value="[% itemLoo.itemnumber %]" />
                                 [% ELSE %]
                                   <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]" />
-                                  <img src="/opac-tmpl/[% itemLoo.theme %]/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
+                                  <img src="/opac-tmpl/[% theme %]/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
                                 [% END %] [% IF ( itemLoo.copynumber ) %][% itemLoo.copynumber %][% END %]
                               </td>
                               [% IF ( item_level_itypes ) %]
                                 <td>[% itemLoo.enumchron %]</td>
                               [% END %]
                               <td>
-                                [% IF ( itemLoo.date_due ) %]
-                                  <span class="checkedout">Due [% itemLoo.date_due %]</span>
+                                [% IF ( itemLoo.dateDue ) %]
+                                  <span class="checkedout">Due [% itemLoo.dateDue %]</span>
                                 [% ELSIF ( itemLoo.transfertwhen ) %]
                                   <span class="intransit">In transit from [% itemLoo.transfertfrom %],
                                     to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>