From e1c981fcfc2fa850a90885afd95d8eadff68ae55 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 19 Dec 2011 12:57:08 -0500 Subject: [PATCH] TPAC: Change title tooltip in results table to useful message From dbs's original commit: The tooltip that would display when hovering over the title of a result in the results table was simply the URI-escaped version of the title text - not particularly helpful. Change this to say "Display record details" as an actual hint about what action will occur when the user clicks on a title in the results list. This modified commit changes the title to 'Display record details for ""' This commit also introduces the HTML plugin as a new loaded-by-default template plugin. Among other things, it's useful for ensuring HTML attributes are safely encoded, moresoe than |html, which does not escape quotes. https://bugs.launchpad.net/evergreen/+bug/902979 Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dan@coffeecode.net> --- Open-ILS/src/templates/opac/parts/header.tt2 | 1 + Open-ILS/src/templates/opac/parts/result/table.tt2 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2 index e6addc88c1..ce519006b9 100644 --- a/Open-ILS/src/templates/opac/parts/header.tt2 +++ b/Open-ILS/src/templates/opac/parts/header.tt2 @@ -2,6 +2,7 @@ USE date; USE CGI = CGI_utf8; USE POSIX; + USE HTML; SET DATE_FORMAT = l('%m/%d/%Y'); # Don't wrap in l() here; do that where this format string is actually used. diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 1ae2b17cc4..6be312216d 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -46,8 +46,9 @@ name='result_table_title_cell' valign="top"> <div class="bold"> - <a name='record_[% rec.id %]' title="[% attrs.title | uri %]" name='item_title' + <a name='record_[% rec.id %]' name='item_title' href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]" + [% HTML.attributes(title => l('Display record details for "[_1]"', attrs.title)) %] class='search_link'>[% attrs.title | html %]</a> </div> <div> -- 2.11.0