From a1961b0d6ad2d197f538fa6e600642295ea68dc3 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Tue, 17 Mar 2015 14:53:05 -0700 Subject: [PATCH] LP#1433328: Add class attribute to e-resource links in TPAC 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 Signed-off-by: Josh Stompro Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/record/summary.tt2 | 2 +- Open-ILS/src/templates/opac/parts/result/table.tt2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 618a88735b..76f45ffebd 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -136,7 +136,7 @@ IF num_uris > 0; [%- ELSE -%]
  • [%- END -%] - + [%- IF uri.href != uri.link; '' _ uri.link _ ''; ELSE; diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index bb9c47228b..06cf8b4fb6 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -302,7 +302,7 @@ END; [% l('Electronic resource') %] - [% uri.link | html %][% ' - ' _ uri.note | html IF uri.note %] + [% uri.link | html %][% ' - ' _ uri.note | html IF uri.note %] [% END %] [% END %] -- 2.43.2