Skip to content

Commit

Permalink
Updated shrinkwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
xavijam committed Nov 23, 2017
2 parents c5f98ae + 625a29d commit 0da70ab
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 28 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -96,6 +96,7 @@ ion for time-series (#12670)
* Added lockout page to show when a user is locked up due to expiration of the trial (#13100)

### Bug fixes / enhancements
* Fix incorrect "back to dashboard" link in dataset view (#13111)
* Improve the discoverability of the table view switch (#13050)
* Change Basemap layer style (#13091)
* Rename point/polygon count to feature count (#13066)
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/dashboard/lockout.css.scss
Expand Up @@ -35,7 +35,8 @@
text-decoration: underline;
}

.Lockout .CDB-Button--primary {
.Lockout .CDB-Button--primary,
.Lockout .CDB-Button--secondary {
margin-top: 20px;
padding-top: 13px;
}
2 changes: 1 addition & 1 deletion app/controllers/admin/users_controller.rb
Expand Up @@ -129,7 +129,7 @@ def delete
def lockout
if current_user.locked?
@expiration_days = @user.remaining_days_deletion
@payments_url = @user.update_payment_url(request.protocol)
@payments_url = @user.plan_url(request.protocol)
render locals: { breadcrumb: false }
else
render_404
Expand Down
25 changes: 15 additions & 10 deletions app/helpers/account_type_helper.rb
Expand Up @@ -9,6 +9,10 @@ def plan_name_no_time(account_type)
plan_name(account_type).gsub(' - Monthly', '').gsub(' - Annual', '')
end

def plan_name_no_trial(account_type)
plan_name(account_type).gsub(' Trial', '')
end

def public_plan_name(account_type)
PUBLIC_PLAN_NAME.fetch(account_type)
end
Expand All @@ -17,20 +21,21 @@ def public_plan_name(account_type)

PUBLIC_PLAN_NAME = {
'FREE' => 'Free',
'PERSONAL30' => 'Personal Trial',
'BASIC' => 'Personal',
'BASIC LUMP-SUM' => 'Personal Lump-Sum'
'PERSONAL30' => 'Professional Trial',
'BASIC' => 'Professional',
'BASIC LUMP-SUM' => 'Professional Lump-Sum',
'ENTERPRISE' => 'Enterprise'
}.freeze

PLAN_NAME_BY_ACCOUNT_TYPE = {
'FREE' => 'Free',
'PERSONAL30' => 'Personal Trial',
'BASIC' => 'Personal',
'BASIC LUMP-SUM' => 'Personal',
'BASIC ACADEMIC' => 'Personal Non-Profit',
'BASIC NON-PROFIT' => 'Personal Non-Profit',
'BASIC LUMP-SUM ACADEMIC' => 'Personal Non-Profit',
'BASIC LUMP-SUM NON-PROFIT' => 'Personal Non-Profit',
'PERSONAL30' => 'Professional Trial',
'BASIC' => 'Professional',
'BASIC LUMP-SUM' => 'Professional',
'BASIC ACADEMIC' => 'Professional Non-Profit',
'BASIC NON-PROFIT' => 'Professional Non-Profit',
'BASIC LUMP-SUM ACADEMIC' => 'Professional Non-Profit',
'BASIC LUMP-SUM NON-PROFIT' => 'Professional Non-Profit',
'Enterprise Builder - Annual' => 'Enterprise',
'Enterprise Builder - On-premises - Annual' => 'Enterprise',
'Cloud Engine & Enterprise Builder - Annual' => 'Enterprise',
Expand Down
14 changes: 8 additions & 6 deletions app/views/admin/users/lockout.html.erb
Expand Up @@ -6,15 +6,17 @@
<div class="OnBoarding-welcomeContent">
<div class="CDB-Text OnBoarding-welcomeContentInner">
<p class="OnBoarding-welcomeContentTitle OnBoarding-welcomeContentMargin">Welcome back,<br/><%= @user.username %>!</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">Your trial period has expired.</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">Please add a payment method to continue using CARTO.</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">CARTO has Community Programs for qualified applicants.<br/>Learn more about our Grants and Ambassador programs.</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">You've reached the end of your CARTO trial period.</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">By upgrading, you'll be able to continue using CARTO. Our Professional plan is a great fit for occasional use, and our Enterprise plans offer access to the Data Observatory, private sharing, custom connectors, and business-strength data services.</p>
<% if @expiration_days %>
<p class="OnBoarding-welcomeContentText u-bSpace OnBoarding-welcomeContentMargin">Your account will be deleted in <%= pluralize(@expiration_days, "day") %> if you do not add a payment method or <a class="u-whiteTextColor" href="https://carto.com/community/">qualify for a Community Program</a>.</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">Your account and data will be preserved for <%= pluralize(@expiration_days, "day") %>, so that upon upgrade you will regain access to the data and maps.<br/>If you're a student or an ambassador, remember you can also qualify for our <a class="u-whiteTextColor" href="https://carto.com/community/">Community Program</a>.</p>
<% else %>
<p class="OnBoarding-welcomeContentText u-bSpace OnBoarding-welcomeContentMargin">Your account will be deleted in few days if you do not add a payment method or <a class="u-whiteTextColor" href="https://carto.com/community/">qualify for a Community Program</a>.</p>
<p class="OnBoarding-welcomeContentText OnBoarding-welcomeContentMargin">Your account and data will be preserved for a few days, so that upon upgrade you will regain access to the data and maps.<br/>If you're a student or an ambassador, remember you can also qualify for our <a class="u-whiteTextColor" href="https://carto.com/community/">Community Program</a>.</p>
<% end %>
<a class="CDB-Button CDB-Button--primary u-bSpace u-iBlock" href="<%= @payments_url %>">
<a class="CDB-Button CDB-Button--secondary CDB-Button--white u-bSpace u-iBlock" href="mailto:sales@carto.com">
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-medium u-bSpace">CONTACT SALES</span>
</a>
<a class="CDB-Button CDB-Button--primary u-bSpace u-iBlock u-lSpace" href="<%= @payments_url %>">
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-medium u-bSpace">ADD PAYMENT METHOD</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lib/assets/core/javascripts/cartodb3/dataset/dataset.tpl
@@ -1,6 +1,6 @@
<div class="Editor-wrapper">
<div class="EditorMenu">
<a class="EditorMenu-logo js-editor-logo" href="<%- url %>/datasets">
<a class="EditorMenu-logo js-editor-logo" href="<%- url %>/dashboard/datasets">
<svg width="32px" height="32px" viewBox="762 -58 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g class="imago" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(762.000000, -58.000000)">
<circle class="Halo" fill="#FFFFFF" opacity="0.2" cx="16" cy="16" r="16"></circle>
Expand Down
Expand Up @@ -86,7 +86,7 @@ describe('dataset/dataset-view', function () {
expect(this.view.$el.html()).toContain('<div class="Dataset-viewTable js-table"></div>');
expect(this.view.$el.html()).toContain('<div class="Dataset-options js-datasetOptions"></div>');
expect(this.view.$el.html()).toContain('<div class="Dataset-notifier js-notifier"></div>');
expect(this.view.$el.html()).toContain('<a class="EditorMenu-logo js-editor-logo" href="/u/pepe/datasets">');
expect(this.view.$el.html()).toContain('<a class="EditorMenu-logo js-editor-logo" href="/u/pepe/dashboard/datasets">');
expect(this.view._initViews).toHaveBeenCalled();
});
});
Expand Down
Expand Up @@ -64,6 +64,11 @@ describe('deep-insights-integrations/widgets-integration', function () {
this.integration._widgetDefinitionsCollection.off();
this.integration = null;
document.body.removeChild(mapElement);
var nodes = document.querySelectorAll('.CDB-Widget-tooltip');
[].slice.call(nodes).forEach(function (node) {
var parent = node.parentNode;
parent.removeChild(node);
});
jasmine.Ajax.uninstall();
});

Expand Down Expand Up @@ -321,12 +326,6 @@ describe('deep-insights-integrations/widgets-integration', function () {
Backbone.ajax = originalAjax;
category.trigger('destroy', category);
histogram.trigger('destroy', category);

var nodes = document.querySelectorAll('.CDB-Widget-tooltip');
[].slice.call(nodes).forEach(function (node) {
var parent = node.parentNode;
parent.removeChild(node);
});
});

it('should cancel autostyle on remove widget', function () {
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "4.10.84-support1135",
"version": "4.10.88",
"description": "CARTO UI frontend",
"repository": {
"type": "git",
Expand Down

0 comments on commit 0da70ab

Please sign in to comment.