From 2cc3997a195b2e73cb98254f0528730c30a06115 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 27 Jun 2011 14:18:39 -0400 Subject: [PATCH] Meaningful title elements for record details and search results Rather than the generic "Record Details" and "Search Results", populate the element with the actual title of the record or the search query, respectively. We punt on advanced search results for now, until we can parse the array into something usable. Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Dan Scott <dan@coffeecode.net> --- Open-ILS/web/templates/default/opac/parts/record/summary.tt2 | 1 + Open-ILS/web/templates/default/opac/results.tt2 | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 index 582b98b594..4dbfadca79 100644 --- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 @@ -1,3 +1,4 @@ +[% ctx.page_title = attrs.title | html_entity %] <!-- ****************** rdetail_summary.xml ***************************** --> <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr> <!-- This holds the record summary information --> diff --git a/Open-ILS/web/templates/default/opac/results.tt2 b/Open-ILS/web/templates/default/opac/results.tt2 index 0fb4c3155f..d0b6d2825b 100644 --- a/Open-ILS/web/templates/default/opac/results.tt2 +++ b/Open-ILS/web/templates/default/opac/results.tt2 @@ -3,7 +3,12 @@ WRAPPER "default/opac/parts/base.tt2"; INCLUDE "default/opac/parts/topnav.tt2"; - ctx.page_title = l("Search Results"); + + IF is_advanced; + ctx.page_title = l("Search Results"); + ELSE; + ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity; + END; page = CGI.param('page') || 0; page_count = POSIX.ceil(ctx.hit_count / ctx.page_size); -- 2.11.0