#Set the ebook_record_item before processing the item_parser
ebook_record_item = ctx.title_info.item;
+ ebook_record_item.interest = ctx.title_info.interest;
ebook_record_item.summary = ctx.title_summary.summary;
ebook_record_item.recommended_books = ctx.recommended_books;
ebook_isbn = ebook_record_item.isbn;
PROCESS "opac/ebook_api/rbdigital/parts/item_parser.tt2";
%]
+
<!-- ****************** rdetail_summary.xml ***************************** -->
<!-- Ebook Spinner -->
<span id="ebook_spinner" class="hidden"> Processing ... <img style="width:20px;height:auto" src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]" alt="[% l("Processing...") %]"/></span>
[% END %]
<div id="rdetail_actions_div">
- [% IF ebook_item.isTitleAvailable == true; %]
+ [% IF ebook_item.isAvailable == 1; %]
<div class="rdetail_aux_utils ebook_action">
[% IF ctx.checkouts.$ebook_isbn != ""; %]
<a id="[% ebook_item.isbn %]_ebook_checkout_download_link"
[% END; %]
</div>
- [% END; %]
-
- [% IF ctx.checkouts.$ebook_isbn == ""; %]
-
+ [% ELSE; %]
<div id="[% ebook_item.isbn %]_ebook_hold" class="rdetail_aux_utils ebook_action">
<a id="[% ebook_item.isbn %]_ebook_place_hold"
href="#" data-isbn="[% ebook_item.isbn %]"
IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
result_count = ctx.result_start;
+ USE Dumper;
%]
[% PROCESS "opac/parts/result/paginate.tt2" %]
[% ctx.results_count_header = PROCESS results_count_header;
[%
FOR rec IN ctx.records;
ebook_record_item = rec.item;
+ ebook_record_item.interest = rec.interest;
PROCESS "opac/ebook_api/rbdigital/parts/item_parser.tt2";
#ebook_item variable is populated inside the item_parser file
ebook_isbn = ebook_item.isbn;
</div>
<div class="result_table_utils_cont">
<div class="result_table_utils">
- [% IF ebook_item.isTitleAvailable == true; %]
- <div id="[%- rec.item.isbn -%]_ebook_checkout" class="results_aux_utils result_util ebook_action">
- [% IF ctx.checkouts.$ebook_isbn != ""; %]
- <a id="[% ebook_item.isbn %]_ebook_checkout_download_link"
- href="#"
- data-downloadurl="[% ctx.checkouts.$ebook_isbn; %]"
- class="no-dec ebook_checkout_download_link"
- rel="nofollow" vocab=""
- data-isbn="[% ebook_item.isbn %]">
- <img src="[% ctx.media_prefix %]/images/minus_sign.png[% ctx.cache_key %]" alt="" /> [% l("Download") %]</a>
+ [% IF ebook_item.isAvailable == 1; %]
+ <div id="[%- rec.item.isbn -%]_ebook_checkout" class="results_aux_utils result_util ebook_action">
+ [% IF ctx.checkouts.$ebook_isbn != ""; %]
+ <a id="[% ebook_item.isbn %]_ebook_checkout_download_link"
+ href="#"
+ data-downloadurl="[% ctx.checkouts.$ebook_isbn; %]"
+ class="no-dec ebook_checkout_download_link"
+ rel="nofollow" vocab=""
+ data-isbn="[% ebook_item.isbn %]">
+ <img src="[% ctx.media_prefix %]/images/minus_sign.png[% ctx.cache_key %]" alt="" /> [% l("Download") %]</a>
- [% ELSE; %]
- <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
- {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
- ['query','tag','subfield','term','_special','sort','page']) %]"
- [% html_text_attr('title', l('Check Out [_1]', ebook_item.title)) %]
- data-isbn="[% ebook_item.isbn %]"
- class="no-dec ebook_checkout_link" rel="nofollow" vocab="">
- <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
- alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
- [% END; %]
- </div>
+ [% ELSE; %]
+ <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
+ {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
+ ['query','tag','subfield','term','_special','sort','page']) %]"
+ [% html_text_attr('title', l('Check Out [_1]', ebook_item.title)) %]
+ data-isbn="[% ebook_item.isbn %]"
+ class="no-dec ebook_checkout_link" rel="nofollow" vocab="">
+ <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
+ alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
+ [% END; %]
+ </div>
+ [% ELSE; %]
+ <div id="[% ebook_item.isbn %]_ebook_hold" class="rdetail_aux_utils result_util ebook_action">
+ <a id="[% ebook_item.isbn %]_ebook_place_hold"
+ href="#" data-isbn="[% ebook_item.isbn %]"
+ class="no-dec ebook_place_hold [% IF ctx.holds.$ebook_isbn == "1"; %] hidden [% END; %]" rel="nofollow" vocab="">
+ <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
+ [% img_alt(l('Place Hold on [_1]', ebook_item.title)) %]/>
+ <span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
+
+ <a id="[% ebook_item.isbn %]_ebook_cancel_hold"
+ href="#" data-isbn="[% ebook_item.isbn %]"
+ class="no-dec ebook_cancel_hold [% IF ctx.holds.$ebook_isbn != "1"; %] hidden [% END; %]" rel="nofollow" vocab="">
+ <img src="[% ctx.media_prefix %]/images/minus_sign.png[% ctx.cache_key %]"
+ [% img_alt(l('Cancel Hold on [_1]', ebook_item.title)) %]/>
+ <span class="result_place_hold">[% l('Cancel Hold on E-Item') %]</span></a>
+ </div>
[% END; %]
[% IF !ctx.is_meta %]
- <div class="results_aux_utils result_util">
+ <div class="results_aux_utils result_util ebook_action">
[% IF !ctx.is_staff; %]
<a id="[% ebook_item.isbn %]_ebook_wishlist_add" href="#"
class="no-dec ebook_wishlist_link_add [% IF ctx.wishlist.$ebook_isbn == "1"; %] hidden [% END; %]"