[% IF ctx.user;
INCLUDE "opac/parts/bookbag_actions.tt2";
%]
-<!-- PINES Customization: remove Temporary List block if not logged in -->
- [% ELSE %]
- <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
- <i>[% l('Log in to use Lists') %]</i>
+ [% ELSE;
+ operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
+ label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
+ %]
+ <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => ctx.bre_id}, stop_parms) %]" class="no-dec" rel="nofollow" vocab="">
+ <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
+ [% label %]
+ </a>
<a href="http://pines.georgialibraries.org/catalog-help#my_list" target="_blank">
<img src="[% ctx.media_prefix %]/images/question-mark.png" alt="Learn about lists" border=0></a>
[% END %]
[% IF ctx.user;
INCLUDE "opac/parts/bookbag_actions.tt2";
%]
- <!-- PINES Customization: remove Temporary List block if not logged in -->
- [% ELSE %]
- <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
- <i>[% l('Log in to use Lists') %]</i>
+ [% ELSE;
+ operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
+ label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
+ title_label = (operation == "add") ?
+ l("Add [_1] to my list", attrs.title) :
+ l("Remove [_1] from my list", attrs.title);
+ href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
+ {record => rec.id, anchor => 'record_' _ rec.id}, 1);
+ %]
+ <a href="[% href %]" class="no-dec"
+ [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
+ <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
+ [% label %]
+ </a>
<a href="http://pines.georgialibraries.org/catalog-help#my_list" target="_blank">
<img src="[% ctx.media_prefix %]/images/question-mark.png" alt="Learn about lists" border=0></a>
[% END %]