[%- # Display holdings/availability info from ebook API # # We require the following info: # - rec_id: internal ID for this record (rec.id in search results, ctx.bre_id in record summary) # - ebook_id: external ID for title (ISBN for OneClickdigital, unique identifier for OverDrive) # - vendor (oneclickdigital, overdrive) IF args.ebook_test_id; ebook.ebook_id = args.ebook_test_id; ebook.vendor = 'ebook_test'; ELSIF args.oneclickdigital_id; ebook.ebook_id = args.oneclickdigital_id; ebook.vendor = 'oneclickdigital'; ELSIF args.overdrive_id; ebook.ebook_id = args.overdrive_id; ebook.vendor = 'overdrive'; END; IF ebook.ebook_id; IF ctx.page == 'rresult'; ebook.rec_id = rec.id; ELSE; ebook.rec_id = ctx.bre_id; END; # This div is hidden by default. The JS layer will unhide it, use the ebook_id # to retrieve holdings/availability info via the appropriate vendor API, and # overwrite the div's contents with that information. -%] [% END %]