Commit 086549d9 authored by Luke Bennett's avatar Luke Bennett

fix cherry picking

parent c58a4ea8
......@@ -164,11 +164,12 @@ ActiveRecord::Schema.define(version: 20180826111825) do
t.boolean "authorized_keys_enabled", default: true, null: false
t.string "auto_devops_domain"
t.boolean "pages_domain_verification_enabled", default: true, null: false
t.string "user_default_internal_regex"
t.boolean "allow_local_requests_from_hooks_and_services", default: false, null: false
t.boolean "enforce_terms", default: false
t.boolean "mirror_available", default: true, null: false
t.boolean "hide_third_party_offers", default: false, null: false
t.boolean "instance_statistics_visibility_private", default: true, null: false
t.boolean "instance_statistics_visibility_private", default: false, null: false
t.boolean "web_ide_clientside_preview_enabled", default: false, null: false
t.boolean "user_show_add_ssh_key_message", default: true, null: false
t.string "user_default_internal_regex"
......@@ -330,10 +331,10 @@ ActiveRecord::Schema.define(version: 20180826111825) do
t.integer "auto_canceled_by_id"
t.boolean "retried"
t.integer "stage_id"
t.boolean "protected"
t.integer "failure_reason"
t.integer "artifacts_file_store"
t.integer "artifacts_metadata_store"
t.boolean "protected"
t.integer "failure_reason"
end
add_index "ci_builds", ["artifacts_expire_at"], name: "index_ci_builds_on_artifacts_expire_at", where: "(artifacts_file <> ''::text)", using: :btree
......@@ -390,13 +391,13 @@ ActiveRecord::Schema.define(version: 20180826111825) do
t.integer "project_id", null: false
t.integer "job_id", null: false
t.integer "file_type", null: false
t.integer "file_store"
t.integer "size", limit: 8
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
t.datetime_with_timezone "expire_at"
t.string "file"
t.binary "file_sha256"
t.integer "file_store"
t.integer "file_format", limit: 2
t.integer "file_location", limit: 2
end
......@@ -2401,7 +2402,7 @@ ActiveRecord::Schema.define(version: 20180826111825) do
add_foreign_key "term_agreements", "users", on_delete: :cascade
add_foreign_key "timelogs", "issues", name: "fk_timelogs_issues_issue_id", on_delete: :cascade
add_foreign_key "timelogs", "merge_requests", name: "fk_timelogs_merge_requests_merge_request_id", on_delete: :cascade
add_foreign_key "todos", "namespaces", column: "group_id", name: "fk_a27c483435", on_delete: :cascade
add_foreign_key "todos", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "todos", "notes", name: "fk_91d1f47b13", on_delete: :cascade
add_foreign_key "todos", "projects", name: "fk_45054f9c45", on_delete: :cascade
add_foreign_key "todos", "users", column: "author_id", name: "fk_ccf0373936", on_delete: :cascade
......
import initDismissableCallout from '~/dismissable_callout';
document.addEventListener('DOMContentLoaded', () => initDismissableCallout('.js-gold-trial-callout'));
.user-callout.promotion-callout {
margin: 20px 0 0;
&.prepend-top-10 {
margin-top: 10px;
}
&.append-bottom-20 {
margin-bottom: 20px;
}
.user-callout-copy {
max-width: 700px;
margin-left: auto;
margin-right: auto;
}
.bordered-box {
padding: 20px;
border-color: $border-color;
background-color: $white-light;
align-items: flex-start;
.close {
.dismiss-icon {
color: $gray-darkest;
}
&:hover {
.dismiss-icon {
color: $text-color;
}
}
}
.svg-container {
margin-right: 15px;
}
}
&.promotion-empty-page {
margin-top: 56px;
}
&.promotion-advanced-search {
margin: 0;
border-bottom: solid 1px $border-color;
h5 {
margin-top: 0;
}
.bordered-box.content-block {
border: 0;
padding: 20px 0;
justify-content: left;
svg {
height: auto;
}
}
.user-callout-copy {
margin-left: 0;
}
}
.promotion-burndown-charts-content {
justify-content: end;
.svg-container {
margin-left: 4px;
margin-right: 24px;
}
.user-callout-copy {
margin: 0;
}
}
&.thin-callout {
.bordered-box {
padding: $gl-padding;
padding-left: 40px;
.close {
position: relative;
top: 0;
right: 0;
}
}
.svg-container .svg {
max-width: 39px;
max-height: 39px;
}
}
}
.promotion-modal {
.modal-dialog {
width: 540px;
}
.modal-header {
border-bottom: 0;
}
.modal-body {
margin-top: -20px;
padding: 16px 16px 32px;
}
.modal-footer {
border-top: 0;
}
}
.promotion-backdrop {
background-color: $white-transparent;
position: absolute;
padding-top: 72px;
.user-callout-copy {
max-width: 700px;
}
}
.promotion-issue-sidebar {
.promotion-issue-sidebar-message {
padding: $gl-padding-top;
.dropdown-title {
margin: 0 0 10px;
}
.btn + .btn {
margin-top: $gl-padding-4;
}
}
.btn {
padding: $gl-vert-padding $gl-btn-padding;
border-radius: $border-radius-default;
display: block;
line-height: $line-height-base;
}
.right-sidebar & .btn-link {
display: inline;
color: $blue-600;
background-color: transparent;
padding: 0;
&:hover {
background-color: transparent;
color: $blue-800;
}
}
}
.promotion-issue-template-message {
padding: $gl-padding 30px 20px $gl-padding;
p {
margin-right: 20px;
}
.dropdown-title {
margin: 0 -25px;
padding: 0;
overflow: initial;
border-bottom: 0;
}
.btn {
padding: $gl-vert-padding $gl-btn-padding;
border-radius: $border-radius-default;
display: inline-block;
line-height: $line-height-base;
}
.btn-link {
display: inline;
color: $blue-600;
padding: 0;
&:hover {
background-color: transparent;
color: $blue-800;
}
}
}
# frozen_string_literal: true
module EE
module UsersHelper
def users_sentence(users, link_class: nil)
users.map { |user| link_to(user.name, user, class: link_class) }.to_sentence.html_safe
end
def user_namespace_union(user = current_user, select = :id)
::Gitlab::SQL::Union.new([
::Namespace.select(select).where(type: nil, owner: user),
user.owned_groups.select(select).where(parent_id: nil)
]).to_sql
end
def user_has_namespace_with_trial?(user = current_user)
::Namespace
.from("(#{user_namespace_union(user, :trial_ends_on)}) #{::Namespace.table_name}")
.where('trial_ends_on > ?', Time.now.utc)
.any?
end
def user_has_namespace_with_gold?(user = current_user)
::Namespace
.includes(:plan)
.where("namespaces.id IN (#{user_namespace_union(user)})") # rubocop:disable GitlabSecurity/SqlInjection
.where.not(plans: { id: nil })
.any?
end
end
end
- if show_gold_trial? && user_default_dashboard?
.pt-1.d-none.d-md-block{ class: container_class }
.user-callout.promotion-callout.thin-callout.js-gold-trial-callout{ data: { uid: 'trial_callout_dismissed', feature_id: UserCalloutsHelper::GOLD_TRIAL, dismiss_endpoint: user_callouts_path } }
.bordered-box.justify-content-left.align-items-center
.svg-container
= image_tag 'illustrations/golden_tanuki.svg', class: 'svg'
.d-flex.flex-grow.align-items-center
.user-callout-copy.ml-0
%h5.mb-0.mt-0= _('Free Trial of GitLab.com Gold')
%p.mb-0
%span= _('Try all GitLab has to offer for 30 days.')
%span.d-none.d-sm-inline= _('No credit card required.')
= link_to _('Start your trial'), 'https://customers.gitlab.com/trials/new?gl_com=true', class: 'btn btn-primary mr-5 mt-2 mt-sm-0', target: '_blank'
%button.btn.btn-default.close.js-close{ type: 'button',
'aria-label' => _('Dismiss trial promotion') }
= icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true')
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