From 49be9ddaaf25b1c8490fdfad1eebd16aca68aa9b Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 28 Jul 2011 16:46:12 -0400 Subject: [PATCH] Don't build image tags for non-existing mattype icons Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/web/templates/default/opac/parts/misc_util.tt2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 index b8e3e9ccf8..f9ebae38b2 100644 --- a/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/misc_util.tt2 @@ -48,7 +48,7 @@ FOR icon_style IN ['mattype', 'item_type']; node = xml.findnodes( '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]'); - IF node; + IF node AND node.textContent; args.format_label = node.getAttribute('coded-value') args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png'; LAST; -- 2.11.0