Commit 63902979 authored by Mike Greiling's avatar Mike Greiling Committed by Annabel Dunstone Gray

Add missing UX for "License features applied to Groups or individuals"

parent 01a18396
...@@ -573,3 +573,12 @@ $filter-value-selected-color: #d7d7d7; ...@@ -573,3 +573,12 @@ $filter-value-selected-color: #d7d7d7;
Animation Functions Animation Functions
*/ */
$dropdown-animation-timing: cubic-bezier(0.23, 1, 0.32, 1); $dropdown-animation-timing: cubic-bezier(0.23, 1, 0.32, 1);
/*
GitLab Plans
*/
$gl-gold-plan: #d4af37;
$gl-silver-plan: #91a1ab;
$gl-bronze-plan: #cd7f32;
$gl-no-plan: $gl-gray-light;
...@@ -159,3 +159,38 @@ table.pipeline-project-metrics tr td { ...@@ -159,3 +159,38 @@ table.pipeline-project-metrics tr td {
height: 50px; height: 50px;
} }
} }
.plan-badge {
margin-right: 15px;
svg {
position: relative;
top: 3px;
height: 16px;
width: 16px;
}
&.inline {
display: inline-block;
margin: 0 4px;
}
&[data-plan="gold"] {
color: darken($gl-gold-plan, 20%);
svg g { fill: $gl-gold-plan; }
}
&[data-plan="silver"] {
color: darken($gl-silver-plan, 20%);
svg g { fill: $gl-silver-plan; }
}
&[data-plan="bronze"] {
color: darken($gl-bronze-plan, 20%);
svg g { fill: $gl-bronze-plan; }
}
&:not([data-plan]) {
svg g { fill: $gl-no-plan; }
}
}
- namespace = local_assigns[:namespace]
- if current_application_settings.should_check_namespace_plan? && namespace && namespace.plan.present?
%span.plan-badge.has-tooltip{ data: { plan: namespace.plan }, title: "#{namespace.plan.titleize} Plan" }
= custom_icon('icon_premium')
- namespace = local_assigns[:namespace]
- if current_application_settings.should_check_namespace_plan? && namespace
%li
%span.light Plan:
- if namespace.plan.present?
%strong.plan-badge.inline{ data: { plan: namespace.plan } }
= custom_icon('icon_premium')
= namespace.plan.titleize
- else
%strong.plan-badge.inline
= custom_icon('icon_premium')
No Plan
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
%span.badge %span.badge
= storage_counter(group.storage_size) = storage_counter(group.storage_size)
= render 'admin/namespace_plan_badge', namespace: group
%span %span
= icon('bookmark') = icon('bookmark')
= number_with_delimiter(group.projects.count) = number_with_delimiter(group.projects.count)
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
%strong %strong
= @group.created_at.to_s(:medium) = @group.created_at.to_s(:medium)
= render 'admin/namespace_plan_info', namespace: @group
%li %li
%span.light Storage: %span.light Storage:
%strong= storage_counter(@group.storage_size) %strong= storage_counter(@group.storage_size)
......
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
= render partial: 'access_levels', locals: { f: f } = render partial: 'access_levels', locals: { f: f }
- if current_application_settings.should_check_namespace_plan?
= f.fields_for :namespace do |namespace_form|
%fieldset
%legend Licensed Features
= render 'admin/namespace_plan', f: namespace_form
= render partial: 'limits', locals: { f: f } = render partial: 'limits', locals: { f: f }
%fieldset %fieldset
...@@ -70,12 +76,6 @@ ...@@ -70,12 +76,6 @@
= f.label :note, 'Note', class: 'control-label' = f.label :note, 'Note', class: 'control-label'
.col-sm-10= f.text_area :note, class: 'form-control' .col-sm-10= f.text_area :note, class: 'form-control'
- if current_application_settings.should_check_namespace_plan?
= f.fields_for :namespace do |namespace_form|
%fieldset
%legend Plan
= render 'admin/namespace_plan', f: namespace_form
.form-actions .form-actions
- if @user.new_record? - if @user.new_record?
= f.submit 'Create user', class: "btn btn-create" = f.submit 'Create user', class: "btn btn-create"
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
.row-second-line.str-truncated-100 .row-second-line.str-truncated-100
= mail_to user.email, user.email = mail_to user.email, user.email
.controls .controls
= render 'admin/namespace_plan_badge', namespace: user.namespace
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn' = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn'
- unless user == current_user - unless user == current_user
.dropdown.inline .dropdown.inline
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
- else - else
Disabled Disabled
= render 'admin/namespace_plan_info', namespace: @user.namespace
%li %li
%span.light External User: %span.light External User:
%strong %strong
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g fill="#262626" fill-rule="evenodd"><path d="m8 10c-2.761 0-5-2.239-5-5 0-2.761 2.239-5 5-5 2.761 0 5 2.239 5 5 0 2.761-2.239 5-5 5m0-2.5c1.381 0 2.5-1.119 2.5-2.5 0-1.381-1.119-2.5-2.5-2.5-1.381 0-2.5 1.119-2.5 2.5 0 1.381 1.119 2.5 2.5 2.5m0-1c-.828 0-1.5-.672-1.5-1.5 0-.828.672-1.5 1.5-1.5.828 0 1.5.672 1.5 1.5 0 .828-.672 1.5-1.5 1.5m4.893 1.974l2.321 4.02c.138.239.028.447-.245.463l-1.737.104-.959 1.452c-.151.229-.389.214-.524-.019l-2.143-3.712c1.344-.373 2.498-1.201 3.286-2.308m-6.444 2.324l-2.135 3.697c-.135.234-.373.248-.524.019l-.959-1.452-1.737-.104c-.273-.016-.383-.224-.245-.463l2.293-3.971c.798 1.098 1.958 1.914 3.306 2.274" transform="translate(0 1)"/></g></svg>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment