2 # Display holdings/availability info from ebook API
4 # We require the following info:
5 # - rec_id: internal ID for this record (rec.id in search results, ctx.bre_id in record summary)
6 # - ebook_id: external ID for title (ISBN for OneClickdigital, unique identifier for OverDrive)
7 # - vendor (oneclickdigital, overdrive)
11 IF ctx.page == 'rresult';
12 ebook.rec_id = rec.id;
14 ebook.rec_id = ctx.bre_id;
17 ebook.ebook_id = args.ebook.ebook_id;
18 ebook.vendor = args.ebook.vendor;
20 # This div is hidden by default. The JS layer will unhide it, use the ebook_id
21 # to retrieve holdings/availability info via the appropriate vendor API, and
22 # overwrite the div's contents with that information.
24 <div id="[% ebook.rec_id %]" class="ebook_avail hidden">
25 <div id="[% ebook.ebook_id %]" class="[% ebook.vendor %]_avail">
26 <table id="[% ebook.rec_id %]_ebook_holdings" class="result_holdings_table hidden">
29 <th>[% l('Available Formats') %]</th>
30 <th>[% l('Status') %]</th>
34 <td id="[% ebook.rec_id %]_formats"></td>
35 <td id="[% ebook.rec_id %]_status"></td>