[%- END -%]
<div class="rdetail_aux_utils toggle_list">
- [% operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
+ [% operation = ctx.mylist.grep('^' _ ctx.bre_id _ '$').size ? "delete" : "add";
label = (operation == "add") ? l("Add to Cart") : l("Remove from Cart");
%]
<a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => ctx.bre_id}, stop_parms) %]" class="no-dec" rel="nofollow" vocab="">
add_parms.import(
{query => ctx.naive_query_scrub(ctx.user_query)} );
END;
- is_selected = ctx.mylist.grep(rec.id).size;
+ is_selected = ctx.mylist.grep('^' _ rec.id _ '$').size;
%]
<tr class="result_table_row [% IF is_selected %]result_table_row_selected[% END %]">
<td class="results_row_count" name="results_row_count">
{record => rec.id, anchor => 'record_' _ rec.id}, 1);
%]
<a href="[% addhref %]" id="mylist_add_[% rec.id %]"
- [% IF ctx.mylist.grep(rec.id).size %] class="hidden" [% END %]
+ [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %] class="hidden" [% END %]
title="[% l("Add [_1] to cart", attrs.title) %] rel="nofollow" vocab="">
<img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
[% l("Add to cart") %]
</a>
<a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
- [% IF !ctx.mylist.grep(rec.id).size %] class="hidden" [% END %]
+ [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %] class="hidden" [% END %]
title="[% l("Remove [_1] from cart", attrs.title) %] rel="nofollow" vocab="">
<img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
[% l("Remove from cart") %]