In the TPAC, links to electronic resources are not directly, uniquely
identifiable in the DOM. You can specify these links indirectly, with
something like '.result_table_title_cell > td > a' in search results
or '.rdetail_uri > a' on the record details page, but this is fragile
and a bit cumbersome. Adding a unique class attribute directly to the
link elements would make things easier for services built on top of
the TPAC, such as Overdrive API integration or JS-based analytics for
e-resources.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
[%- ELSE -%]
<li class="rdetail_uri" property="offers" vocab="http://schema.org/" typeof="Offer">
[%- END -%]
- <a href="[% uri.href %]" property="url">
+ <a href="[% uri.href %]" class="uri_link" property="url">
[%- IF uri.href != uri.link;
'<span property="description">' _ uri.link _ '</span>';
ELSE;
<td valign='top'>
<strong>[% l('Electronic resource') %]</strong>
</td>
- <td><a href="[% uri.href %]">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
+ <td><a href="[% uri.href %]" class="uri_link">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
</tr>
[% END %]
[% END %]