From: Thomas Berezansky Date: Tue, 10 Dec 2013 17:23:03 +0000 (-0500) Subject: Use search_label for format icons X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1ba8630de94077bdd5ba11b03466603a2a17414d;p=working%2FEvergreen.git Use search_label for format icons So that they will match what shows up in the search box, thus removing patron confusion. Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/src/sql/Pg/990.schema.unapi.sql b/Open-ILS/src/sql/Pg/990.schema.unapi.sql index 78a9a2cc90..ec1efd0d74 100644 --- a/Open-ILS/src/sql/Pg/990.schema.unapi.sql +++ b/Open-ILS/src/sql/Pg/990.schema.unapi.sql @@ -1127,6 +1127,7 @@ CREATE OR REPLACE FUNCTION unapi.mra ( obj_id BIGINT, format TEXT, ename TEXT, XMLATTRIBUTES( key AS name, cvm.value AS "coded-value", + cvm.search_label AS "search-value", rad.filter, rad.sorter ), diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index cdd8eff81f..1936690ea4 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -429,7 +429,10 @@ '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]'); IF node AND node.textContent; type = node.textContent; - args.format_label = node.getAttribute('coded-value') + args.format_label = node.getAttribute('coded-value'); + IF node.getAttribute('search-value'); + args.format_label = node.getAttribute('search-value'); + END; args.schema.itemtype = schema_typemap.$type || 'CreativeWork'; args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ type _ '.png'; LAST;