From c2c8b2796d14b8375ddca631a74d7ed75b882a20 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 17 Feb 2014 15:08:11 -0500 Subject: [PATCH] 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 --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 12 ++++++++++++ .../src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql | 11 +++++++++++ Open-ILS/web/images/format_icons/icon_format/music.png | Bin 0 -> 1112 bytes 3 files changed, 23 insertions(+) create mode 100644 Open-ILS/web/images/format_icons/icon_format/music.png 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 0000000000000000000000000000000000000000..132ca40b6f919c1fa56d866d95e2dd6e5029ac59 GIT binary patch literal 1112 zcmeAS@N?(olHy`uVBq!ia0vp^feU|?Vf#3n!t z1jflAl54r;D;bbAWd)AuKpJd6!=CNBOBooLet5b#hG?8GJ?)z>?JB|k;lJ_cGw1f* z=zD!6P^ds*39s+Vg-%XRkB+c2>|=~?V!qE+`1lHUhnJ|++7(wqL_DOd`yN+3KBB+d z+Iq9`ogIb0W9vd%mo<9uJ_tOrRppwW1Y5WRi=vKhsHxTV>He=zc3-X7^!My{9j2^^ z9}JS7T_!v}OW!j2O+6ex?Z3@-@!+WQrL(GITj#~=zK^JUs5*f`PHuzw=2!jluRg7R z^ptz*yrXk7%`acv%Tn02>7}&2QQJdCNhXd%73){OKK*mH{NYDm6LyO{To;#YYV7^E zL_2p*qxMWzWd(&BZeE$4B~Nlf=9g}eiw$$i-JRj^*Z=9U!tIx5{r?+mS$C^@hTZ=>;4NIttQ4a!nrF7k~S>_IwoAk~K$fIclpx7fB7rBkMs2JD*7aH3tj{@*>3%T;x^?ss^< zS>;xwyrQwaSxC&$toO3#GmU5tm4fSs@83E5IqvjU`IHX(Jyw}()VJwrd{gNDwJL7f z;?0x$R#v=@+cj&((^5M*+nNs?nT*BVCsmBHckVrXOZZ@7nU!6wnf@s~{mZ>N-=|#N zP}z7>Dmv%5_|K|TuDx4-x^DVzC!CV*1J-lS4wIrlvqUv?BbjnF!#Upf2K#z zroL`EXUPoA5UQZ8mXcVKYL#4+3Zxi}fSE|w&`8(FJjBq<%Fxitz*yJ7)XKo1aapG> ziiX_$l+3hBxCTRm5JOWdLlY|#Gl+)EoFdynSq@}FRzYgIRdRk#eo=8jVlvPcozl?x uKuHC-WN~6{K~82~x^7xxa!Gy>gJFfC4ivwf`lkS>mci52&t;ucLK6Ub^3fUq literal 0 HcmV?d00001 -- 2.11.0