From: Bill Erickson Date: Mon, 17 Feb 2014 20:08:11 +0000 (-0500) Subject: LP#1053397 catch-all 'music' icon_format attribute value X-Git-Tag: sprint4-merge-nov22~2266 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c2c8b2796d14b8375ddca631a74d7ed75b882a20;p=working%2FEvergreen.git LP#1053397 catch-all 'music' icon_format attribute value Many records in the Evergreen sample data have item_type=j and no sound recording format. This seems likely to happen in the wild, as well. The new coded value captures everying with item_type=j and no sr_format. Also included is a "music.png" icon, which looks like a pair of happy eigth notes. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 08e71ab687..98e5617e1e 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -6811,6 +6811,13 @@ INSERT INTO config.coded_value_map oils_i18n_gettext(606, 'Large Print Book', 'ccvm', 'value'), oils_i18n_gettext(606, 'Large Print Book', 'ccvm', 'search_label')) ; +-- catch-all music of unkown format +INSERT INTO config.coded_value_map + (id, ctype, code, value, search_label) VALUES +(607, 'icon_format', 'music', + oils_i18n_gettext(607, 'Musical Sound Recording (Unknown Format)', 'ccvm', 'value'), + oils_i18n_gettext(607, 'Musical Sound Recording (Unknown Format)', 'ccvm', 'search_label')); + -- carve out a slot of 10k IDs for stock CCVMs SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, 10000); @@ -6885,6 +6892,11 @@ INSERT INTO config.composite_attr_entry_definition -- lpbook (585, '{"0":[{"_attr":"item_type","_val":"a"},{"_attr":"item_type","_val":"t"}],"1":{"_attr":"item_form","_val":"d"},"2":[{"_attr":"bib_level","_val":"a"},{"_attr":"bib_level","_val":"c"},{"_attr":"bib_level","_val":"d"},{"_attr":"bib_level","_val":"m"}]}'); +-- music (catch-all) +INSERT INTO config.composite_attr_entry_definition + (coded_value, definition) VALUES +(607, '{"0":{"_attr":"item_type","_val":"j"},"1":{"_not":[{"_attr":"sr_format","_val":"a"},{"_attr":"sr_format","_val":"b"},{"_attr":"sr_format","_val":"c"},{"_attr":"sr_format","_val":"d"},{"_attr":"sr_format","_val":"f"},{"_attr":"sr_format","_val":"e"},{"_attr":"sr_format","_val":"l"}]}}'); + -- use the definitions from the icon_format as the basis for the MR hold format definitions DO $$ DECLARE format TEXT; diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql index bab086ebfb..52b6cc9503 100644 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql +++ b/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql @@ -127,5 +127,16 @@ BEGIN END LOOP; END $$; +INSERT INTO config.coded_value_map + (id, ctype, code, value, search_label) VALUES +(607, 'icon_format', 'music', + oils_i18n_gettext(607, 'Musical Sound Recording (Unknown Format)', 'ccvm', 'value'), + oils_i18n_gettext(607, 'Musical Sound Recording (Unknown Format)', 'ccvm', 'search_label')); + +INSERT INTO config.composite_attr_entry_definition + (coded_value, definition) VALUES +(607, '{"0":{"_attr":"item_type","_val":"j"},"1":{"_not":[{"_attr":"sr_format","_val":"a"},{"_attr":"sr_format","_val":"b"},{"_attr":"sr_format","_val":"c"},{"_attr":"sr_format","_val":"d"},{"_attr":"sr_format","_val":"f"},{"_attr":"sr_format","_val":"e"},{"_attr":"sr_format","_val":"l"}]}}'); + + COMMIT; diff --git a/Open-ILS/web/images/format_icons/icon_format/music.png b/Open-ILS/web/images/format_icons/icon_format/music.png new file mode 100644 index 0000000000..132ca40b6f Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/music.png differ