LP#1053397 catch-all 'music' icon_format attribute value
authorBill Erickson <berick@esilibrary.com>
Mon, 17 Feb 2014 20:08:11 +0000 (15:08 -0500)
committerDan Wells <dbw2@calvin.edu>
Fri, 21 Feb 2014 20:38:55 +0000 (15:38 -0500)
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 <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql
Open-ILS/web/images/format_icons/icon_format/music.png [new file with mode: 0644]

index 08e71ab..98e5617 100644 (file)
@@ -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;
index bab086e..52b6cc9 100644 (file)
@@ -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 (file)
index 0000000..132ca40
Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/music.png differ