diff --git a/NEWS.md b/NEWS.md index 871b5c15ac..66122449c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,6 +14,7 @@ Development * Bump cartodb-common to v1.1.2 * Include DB connections, all parameters for Oauth connections, and the relationship between synchronizations and connections, in User migrations [#16287](https://github.com/CartoDB/cartodb/pull/16287) * Upgrade to CARTO Viewer v1.0.8 [16347](https://github.com/CartoDB/cartodb/pull/16347) +* Show user's database location in profile [16348](https://github.com/CartoDB/cartodb/pull/16348) ### Bug fixes / enhancements - Add "element" param to DO-Catalog entry function [#16343](https://github.com/CartoDB/cartodb/pull/16343) diff --git a/app/assets/stylesheets/common/account_forms.css.scss b/app/assets/stylesheets/common/account_forms.css.scss index 29961a28b4..89f17f1ed4 100644 --- a/app/assets/stylesheets/common/account_forms.css.scss +++ b/app/assets/stylesheets/common/account_forms.css.scss @@ -496,7 +496,16 @@ $sLabel-width: 140px; flex-direction: column; align-items: baseline; justify-content: space-between; - margin-top: 20px; +} + +.FormAccount-databaseLocation { + margin-top: 24px; + margin-bottom: 8px; + text-align: left; +} + +.FormAccount-databaseLocationText { + font-size: 13px; } .FormAccount-avatarPreview { diff --git a/app/helpers/frontend_config_helper.rb b/app/helpers/frontend_config_helper.rb index 1854fe7adc..bb6f335741 100644 --- a/app/helpers/frontend_config_helper.rb +++ b/app/helpers/frontend_config_helper.rb @@ -6,7 +6,7 @@ module FrontendConfigHelper def frontend_config_hash(user = current_user) config = { - region: Cartodb.get_config(:bigquery_region), + region: Cartodb.get_config(:bigquery_region) ? Cartodb.get_config(:bigquery_region).upcase : nil, app_assets_base_url: app_assets_base_url, maps_api_template: maps_api_template, maps_api_v2_template: maps_api_v2_template, diff --git a/assets/stylesheets/common/account_forms.scss b/assets/stylesheets/common/account_forms.scss index 5195dfe32d..b868f292a0 100644 --- a/assets/stylesheets/common/account_forms.scss +++ b/assets/stylesheets/common/account_forms.scss @@ -506,7 +506,16 @@ $sLabel-width: 140px; flex-direction: column; align-items: baseline; justify-content: space-between; - margin-top: 20px; +} + +.FormAccount-databaseLocation { + margin-top: 24px; + margin-bottom: 8px; + text-align: left; +} + +.FormAccount-databaseLocationText { + font-size: 13px; } .FormAccount-avatarPreview { diff --git a/lib/assets/javascripts/dashboard/views/profile/profile-form/profile-form.tpl b/lib/assets/javascripts/dashboard/views/profile/profile-form/profile-form.tpl index b1be2f4583..88fef49e6d 100644 --- a/lib/assets/javascripts/dashboard/views/profile/profile-form/profile-form.tpl +++ b/lib/assets/javascripts/dashboard/views/profile/profile-form/profile-form.tpl @@ -32,7 +32,12 @@ <%= _t('profile.views.form.builder') %>

<%= _t('profile.views.form.write_access') %>

<% if (region) { %> -

<%= region %>

+
+
+ +
+

<%= region %>

+
<% } %> <% } else { %> diff --git a/lib/assets/javascripts/locale/en.json b/lib/assets/javascripts/locale/en.json index f637818bf3..ac3ad39ebd 100644 --- a/lib/assets/javascripts/locale/en.json +++ b/lib/assets/javascripts/locale/en.json @@ -114,6 +114,7 @@ "use_case": "Use case", "phone": "Phone Number", "user_type": "User type", + "database_location": "Database location", "viewer": "VIEWER", "read_only": "Read-only access for datasets and maps", "builder": "BUILDER", @@ -2969,4 +2970,4 @@ "adding": "Adding geometry…" } } -} \ No newline at end of file +}