diff --git a/db/migrate/20150716000001_update_settings.rb b/db/migrate/20150716000001_update_settings.rb new file mode 100644 index 000000000..685412b9e --- /dev/null +++ b/db/migrate/20150716000001_update_settings.rb @@ -0,0 +1,69 @@ +class UpdateSettings < ActiveRecord::Migration + def up + Setting.create_or_update( + title: 'Organization', + name: 'organization', + area: 'System::Branding', + description: 'Will be shown in the app and is included in email footers.', + options: { + form: [ + { + display: '', + null: false, + name: 'organization', + tag: 'input', + }, + ], + }, + state: '', + preferences: { prio: 2 }, + frontend: true + ) + Setting.create_or_update( + title: 'Send client stats', + name: 'ui_send_client_stats', + area: 'System::UI', + description: 'Send client stats/error message to central server to improve the usability.', + options: { + form: [ + { + display: '', + null: true, + name: 'ui_send_client_stats', + tag: 'boolean', + options: { + true => 'yes', + false => 'no', + }, + }, + ], + }, + state: true, + preferences: { prio: 1 }, + frontend: true + ) + Setting.create_or_update( + title: 'Client storage', + name: 'ui_client_storage', + area: 'System::UI', + description: 'Use client storage to cache data to perform speed of application.', + options: { + form: [ + { + display: '', + null: true, + name: 'ui_client_storage', + tag: 'boolean', + options: { + true => 'yes', + false => 'no', + }, + }, + ], + }, + state: false, + preferences: { prio: 2 }, + frontend: true + ) + end +end diff --git a/db/seeds.rb b/db/seeds.rb index 34aeabc0c..c6f4679d4 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -75,7 +75,7 @@ Setting.create_if_not_exists( title: 'Organization', name: 'organization', area: 'System::Branding', - description: 'Will be shown in the app and is included in email headers.', + description: 'Will be shown in the app and is included in email footers.', options: { form: [ { @@ -273,7 +273,7 @@ Setting.create_if_not_exists( title: 'Send client stats', name: 'ui_send_client_stats', area: 'System::UI', - description: 'Send client stats to central server.', + description: 'Send client stats/error message to central server to improve the usability.', options: { form: [ { @@ -289,6 +289,7 @@ Setting.create_if_not_exists( ], }, state: true, + preferences: { prio: 1 }, frontend: true ) Setting.create_if_not_exists( @@ -311,6 +312,7 @@ Setting.create_if_not_exists( ], }, state: false, + preferences: { prio: 2 }, frontend: true )