Bug 29756

Summary: No Place hold button on OPAC details page if number of items exceeds OpacMaxItemsToDisplay
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: cbrannon, george
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2021-12-22 17:33:24 UTC
To recreate:

1. Set  OpacMaxItemsToDisplay to something low
2. Find a record from the OPAC that has more items then OpacMaxItemsToDisplay
3. Go to that record's detail page via the OPAC.
4. Look for a 'Place hold' button in action container on the right. You won't find one.
5. Click on "View all the physical items". ow you will see a Place hold button

One should not have to click on "View all the physical items" in order to place a hold.
Comment 1 Christopher Brannon 2021-12-22 17:34:34 UTC
+1
Comment 2 George Williams (NEKLS) 2021-12-29 14:24:10 UTC
This seems highly problematic.
Comment 3 Christopher Brannon 2021-12-30 21:12:36 UTC
Temporary workaround until this is fixed:

  //Add missing hold link to opac-detail when holdings are hidden (v21.05)
  if ($('#opac-detail').length) {
    if($('#holdings:contains("This record has many physical items")').length){
      var detailBib = $('#catalogue_detail_biblio').attr('data-biblionumber');
      $('#action').prepend('<li><a class="reserve btn btn-link btn-lg" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=' + detailBib + '"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a></li>');
    }
  }
  //END Add missing hold link to opac-detail when holdings are hidden
Comment 4 Owen Leonard 2022-01-04 17:09:20 UTC

*** This bug has been marked as a duplicate of bug 13654 ***