Bug 15357: Display existing holds even if no items exist
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 14 Dec 2015 09:32:50 +0000 (09:32 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 01:50:05 +0000 (01:50 +0000)
If all the items have been deleted for a record and holds exist, the
holds are not displayed.
You are not able to delete the items from the record detail page, but
you can from the items page.

Test plan:
1 - Place 1 or more title level holds on a record.
2 - Delete each item individually.
3 - Note that you see the number of holds on the record details page
With this patch, that holds are accessible via the holds tab.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

index 3152f7f..85f687a 100644 (file)
@@ -228,8 +228,9 @@ function checkMultiHold() {
     [% ELSE %]
         <strong>Cannot place hold:</strong> this record has no items attached.
     [% END %]
-    </ div>
-[% ELSE %]
+    </div>
+[% END %]
+
   [% IF ( messagetransfert ) %]
                <div class="dialog message">
                                <h2>Hold found for ([% nextreservtitle %]), please transfer</h2>
@@ -247,7 +248,7 @@ function checkMultiHold() {
     <h1>Confirm holds</h1>
   [% END %]
 
-  [% UNLESS ( borrowernumber ) %]
+  [% UNLESS borrowernumber OR noitems %]
     [% IF ( messageborrower ) %]
       <div class="dialog alert"><h3>Patron not found</h3><p>No patron with this name, please, try another</p> </div>
     [% END %]
@@ -296,7 +297,7 @@ function checkMultiHold() {
             <input type="hidden" name="biblionumbers" value="[% biblionumbers %]"/>
         [% END %]
     </form>
-  [% ELSE %]
+  [% ELSIF NOT noitems %]
 
 [% IF ( exceeded_maxreserves || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
     <div class="dialog alert">
@@ -851,7 +852,6 @@ function checkMultiHold() {
 </form>
 [% END %]
 [% END %]
-[% END %]
 </div>
 </div>