From: Lebbeous Fogle-Weekley Date: Thu, 28 Jul 2011 20:46:12 +0000 (-0400) Subject: Don't build image tags for non-existing mattype icons X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=49be9ddaaf25b1c8490fdfad1eebd16aca68aa9b;p=contrib%2FConifer.git Don't build image tags for non-existing mattype icons Signed-off-by: Lebbeous Fogle-Weekley --- 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;