From: Bill Erickson Date: Wed, 5 Feb 2014 21:18:38 +0000 (-0500) Subject: LP#1269911: composite attributes: configurable "icons" attribute X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=734d2302b72a0f7d55f23a2ed92e7313c10cee03;p=evergreen%2Fequinox.git LP#1269911: composite attributes: configurable "icons" attribute Honor the configurable icon attribute within the TPAC. Create a default set of icons, by copying from the existing icons, which roughly map to the new "icon_format" record attribute definition mappings. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 41ac634edc..78898fb0fa 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -439,19 +439,18 @@ END; # "mattype" == "custom marc format specifier" - FOR icon_style IN ['mattype', 'item_type']; - node = xml.findnodes( - '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]'); - IF node AND node.textContent; - type = node.textContent; - args.format_label = PROCESS get_ccvm_label id=node.getAttribute('cvmid') search_label=1; - IF !args.format_label; - args.format_label = node.getAttribute('coded-value'); - END; - args.schema.itemtype = schema_typemap.$type || 'CreativeWork'; - args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ type _ '.png'; - LAST; + icon_style = ctx.get_cgf('opac.icon_attr').value || 'item_type'; + node = xml.findnodes( + '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]'); + IF node AND node.textContent; + type = node.textContent; + args.format_label = PROCESS get_ccvm_label id=node.getAttribute('cvmid') search_label=1; + IF !args.format_label; + args.format_label = node.getAttribute('coded-value'); END; + args.schema.itemtype = schema_typemap.$type || 'CreativeWork'; + args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ type _ '.png'; + LAST; END; args.bibid = []; diff --git a/Open-ILS/web/images/format_icons/icon_format/book.png b/Open-ILS/web/images/format_icons/icon_format/book.png new file mode 100644 index 0000000000..2800684510 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/book.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/braille.png b/Open-ILS/web/images/format_icons/icon_format/braille.png new file mode 100644 index 0000000000..2800684510 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/braille.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/casaudiobook.png b/Open-ILS/web/images/format_icons/icon_format/casaudiobook.png new file mode 100644 index 0000000000..5ada234d52 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/casaudiobook.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/casmusic.png b/Open-ILS/web/images/format_icons/icon_format/casmusic.png new file mode 100644 index 0000000000..132ca40b6f Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/casmusic.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/cdaudiobook.png b/Open-ILS/web/images/format_icons/icon_format/cdaudiobook.png new file mode 100644 index 0000000000..5ada234d52 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/cdaudiobook.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/cdmusic.png b/Open-ILS/web/images/format_icons/icon_format/cdmusic.png new file mode 100644 index 0000000000..132ca40b6f Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/cdmusic.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/dvd.png b/Open-ILS/web/images/format_icons/icon_format/dvd.png new file mode 100644 index 0000000000..dd0a56f0c9 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/dvd.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/eaudio.png b/Open-ILS/web/images/format_icons/icon_format/eaudio.png new file mode 100644 index 0000000000..b6ddf3e1d6 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/eaudio.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/ebook.png b/Open-ILS/web/images/format_icons/icon_format/ebook.png new file mode 100644 index 0000000000..2800684510 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/ebook.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/equip.png b/Open-ILS/web/images/format_icons/icon_format/equip.png new file mode 100644 index 0000000000..7b76d03f5c Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/equip.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/evideo.png b/Open-ILS/web/images/format_icons/icon_format/evideo.png new file mode 100644 index 0000000000..dd0a56f0c9 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/evideo.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/kit.png b/Open-ILS/web/images/format_icons/icon_format/kit.png new file mode 100644 index 0000000000..7b76d03f5c Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/kit.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/lpbook.png b/Open-ILS/web/images/format_icons/icon_format/lpbook.png new file mode 100644 index 0000000000..2800684510 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/lpbook.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/map.png b/Open-ILS/web/images/format_icons/icon_format/map.png new file mode 100644 index 0000000000..f9f804746f Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/map.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/microform.png b/Open-ILS/web/images/format_icons/icon_format/microform.png new file mode 100644 index 0000000000..2800684510 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/microform.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/phonomusic.png b/Open-ILS/web/images/format_icons/icon_format/phonomusic.png new file mode 100644 index 0000000000..132ca40b6f Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/phonomusic.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/phonospoken.png b/Open-ILS/web/images/format_icons/icon_format/phonospoken.png new file mode 100644 index 0000000000..5ada234d52 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/phonospoken.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/picture.png b/Open-ILS/web/images/format_icons/icon_format/picture.png new file mode 100644 index 0000000000..e523300013 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/picture.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/score.png b/Open-ILS/web/images/format_icons/icon_format/score.png new file mode 100644 index 0000000000..f7b5c7be42 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/score.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/serial.png b/Open-ILS/web/images/format_icons/icon_format/serial.png new file mode 100644 index 0000000000..2800684510 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/serial.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/software.png b/Open-ILS/web/images/format_icons/icon_format/software.png new file mode 100644 index 0000000000..a347513012 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/software.png differ diff --git a/Open-ILS/web/images/format_icons/icon_format/vhs.png b/Open-ILS/web/images/format_icons/icon_format/vhs.png new file mode 100644 index 0000000000..dd0a56f0c9 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/vhs.png differ