support SVF in staff client bib record summary
This is in support of https://bugs.launchpad.net/evergreen/+bug/822928, re: Cat Date
So for example, let's suppose you want to store a "Cat Date" in MARC tag 915, subfield a.
You could do this in the database:
INSERT INTO config.record_attr_definition (name,label,filter,sorter,tag,sf_list)
VALUES ( 'cat_date', 'Cat Date', 'f', 't', '915', 'd' );
Add this to server/locale/en-US/cat_custom.properties (optional but recommended):
staff.cat.bib_brief.cat_date.label=Cat Date:
staff.cat.bib_brief.cat_date.accesskey=
And then add something like this to server/skin/custom.js:
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
prefs.setCharPref(
'oils.bib_brief.horizontal.dynamic_grid_replacement.data',
js2JSON([
["title", "edition", "editor", "cat_date"],
["author", "pubdate", "edit_date", "holds"],
["bib_call_number", "tcn", "create_date", "items"]
])
);
prefs.setCharPref(
'oils.bib_brief.alternate_copy_summary.dynamic_grid_replacement.data',
js2JSON([
["title", "edition", "editor", "cat_date"],
["author", "pubdate", "edit_date", "holds"],
["call_number", "tcn", "create_date", "items"]
])
);
} catch(E) {
dump('Error in custom.js trying to set oils.bib_brief.*.dynamic_grid_replacement.data: ' + E + '\n');
}
Finally, re-ingest any records with tag 915d (you can simply edit the MARC via
the MARC Editor for a specific record, or if the ingest.reingest.force_on_same_marc
row in config.internal_flag is enabled and you're not doing this during library
hours, you can re-ingest all records with UPDATE biblio.record_entry SET marc = marc;)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>