From dd99018ed6d21587c8671d06253ed499ea834448 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 26 Apr 2010 18:17:17 +0000 Subject: [PATCH] org unit settings for formatting displayed date and time values git-svn-id: svn://svn.open-ils.org/ILS/trunk@16308 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 29 ++++++++++++++++++ .../0239.data.org-setting-format.date.time.sql | 34 ++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0239.data.org-setting-format.date.time.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index b5fd021443..64d0007509 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0238'); -- senator +INSERT INTO config.upgrade_log (version) VALUES ('0239'); -- phasefx CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, 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 ddf29942e2..6da856dfc6 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1972,6 +1972,35 @@ INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) 'bool' ); +-- 0239.data.org-setting-format.date.time.sql +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( + 'format.date', + oils_i18n_gettext( + 'format.date', + 'GUI: Format Dates with this pattern.', + 'coust', + 'label'), + oils_i18n_gettext( + 'format.date', + 'GUI: Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010")', + 'coust', + 'description'), + 'string' +), ( + 'format.time', + oils_i18n_gettext( + 'format.time', + 'GUI: Format Times with this pattern.', + 'coust', + 'label'), + oils_i18n_gettext( + 'format.time', + 'GUI: Format Times with this pattern (examples: "h:m:s.SSS a z" for "2:07:20.666 PM Eastern Daylight Time", "HH:mm" for "14:07")', + 'coust', + 'description'), + 'string' +); + -- Org_unit_setting_type(s) that need an fm_class: INSERT into config.org_unit_setting_type ( name, label, description, datatype, fm_class ) VALUES diff --git a/Open-ILS/src/sql/Pg/upgrade/0239.data.org-setting-format.date.time.sql b/Open-ILS/src/sql/Pg/upgrade/0239.data.org-setting-format.date.time.sql new file mode 100644 index 0000000000..d7e4047bd9 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0239.data.org-setting-format.date.time.sql @@ -0,0 +1,34 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0239'); -- phasefx + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( + 'format.date', + oils_i18n_gettext( + 'format.date', + 'GUI: Format Dates with this pattern.', + 'coust', + 'label'), + oils_i18n_gettext( + 'format.date', + 'GUI: Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010")', + 'coust', + 'description'), + 'string' +), ( + 'format.time', + oils_i18n_gettext( + 'format.time', + 'GUI: Format Times with this pattern.', + 'coust', + 'label'), + oils_i18n_gettext( + 'format.time', + 'GUI: Format Times with this pattern (examples: "h:m:s.SSS a z" for "2:07:20.666 PM Eastern Daylight Time", "HH:mm" for "14:07")', + 'coust', + 'description'), + 'string' +); + + +COMMIT; -- 2.11.0