[% dsetting = "opac.default_list"; tclass = "temporary divider"; # Wrap a url to open in a new tab in staff client. MACRO opac_wrap(url) BLOCK; IF ctx.is_staff; # void(0) to return false and not go to new page in current tab. "javascript:xulG.new_tab(xulG.urls.XUL_OPAC_WRAPPER, {}, {'opac_url' : 'oils://remote" _ url _ "'});void(0);"; ELSE; url; END; END; IF rec.id; # Results table context ctx.bre_id = rec.id; stop_parms = 1; rec_anchor = 'record_' _ ctx.bre_id; ELSE; # Record details context rec_anchor => ctx.bre_id; END; IF ctx.user_setting_map.defined(dsetting); default_list = ctx.user_setting_map.$dsetting; END; IF (!default_list) && ctx.bookbags.size; tclass = "temporary"; END; href = opac_wrap(mkurl(ctx.opac_root _ '/mylist/add', { record => ctx.bre_id, anchor => rec_anchor }, stop_parms)); %]