Right now a record with an 856 like:
856 40 $zAvailable online $uhttp://publications.gc.ca $9LUSYS
shows up in search results with an HTML display like:
<a href="http://publications.gc.ca">http://publications.gc.ca</a> - Available online
rather than the much cleaner:
<a href="http://publications.gc.ca">Available online</a>
My simplistic approach is to check to see if the link text == the href,
and if so, and we have a note to display, to use the note as the text of
the link instead.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
res.href = uri.getAttribute('href');
res.link = uri.getAttribute('label');
res.note = uri.getAttribute('use_restriction');
+ # Avoid displaying the href as the link text if we can display the note instead
+ IF res.link == res.href AND res.note;
+ res.link = res.note;
+ res.note = '';
+ END;
args.uris.push(res);
END;
NEXT;