// see if the record has any external links
var links = record.online_loc();
+ // When we see an ezproxy link, hide things that only make sense for physical holdings
+ // FIXME: We should also check for zero copies, or check all links for ezproxy looking urls
+ if (links.length > 0) {
+ if (links[0].substring(0,20) == "http://via.tadl.org/") {
+ hideMe($('rdetail_place_hold'));
+ hideMe($('rdetail_copy_info_link'));
+ hideMe($('rdetail_viewcn_link'));
+ hideMe($('rdetail_copy_info_div'));
+ }
+ }
for( var i = 0; links && links.length > 0 && i < links.length; i = i + 3 ) {
var href = links[i];
// avoid matching "HTTP: The Complete Reference"
displayLabel = note;
}
}
- $('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, displayLabel));
+ $('rdetail_online').appendChild(elem('a', {href:href,'class':'css_button'}, displayLabel));
if (note && note != displayLabel) {
$('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
}
var r = table.rows[pos + 1];
var currentISBN = cleanISBN(rec.isbn());
+ var is_online_only;
+
+ if (rec.online_loc()[0]) {
+ // FIXME: check more than just the first url, check for copies, bib source?
+ if (rec.online_loc()[0].substring(0,20) == "http://via.tadl.org/") {
+ is_online_only = true;
+ }
+ }
if (googleBooksLink) {
var gbspan = $n(r, "googleBooksLink");
args[PARAM_RID] = rec.doc_id();
pic.parentNode.setAttribute("href", buildOPACLink(args));
- unHideMe($n(r,'place_hold_span'));
- $n(r,'place_hold_link').onclick = function() { resultDrawHoldsWindow(rec.doc_id(), 'T'); }
+ if (!is_online_only) {
+ // don't show Place Hold for online-only bibs
+ unHideMe($n(r,'place_hold_span'));
+ $n(r,'place_hold_link').onclick = function() { resultDrawHoldsWindow(rec.doc_id(), 'T'); }
+ }
}
buildSearchLink(STYPE_AUTHOR, rec.author(), author_link);
if(!isNull(rec.physical_description()) ) {
unHideMe( $n(r, "result_table_extra_span"));
- var t = " " + rec.physical_description();
- //$n(r, "result_table_phys_span").appendChild( text(t.replace(/:.*/g,'')));
- $n(r, "result_table_phys_span").appendChild( text(t));
+ var t;
+ if (is_online_only) {
+ // simplify physical description for online-only bibs
+ t = "online";
+ } else {
+ t = " " + rec.physical_description();
+ }
+ //$n(r, "result_table_phys_span").appendChild( text(t.replace(/:.*/g,'')));
+ $n(r, "result_table_phys_span").appendChild( text(t));
}
}
- resultBuildFormatIcons( r, rec, is_mr );
+ if (is_online_only) {
+ hideMe($n(r,'result_table_format_cell'));
+ } else {
+ resultBuildFormatIcons( r, rec, is_mr );
+ }
var bt_params = {
sync : false,