Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
086549d9
Commit
086549d9
authored
Sep 24, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix cherry picking
parent
c58a4ea8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
248 deletions
+6
-248
db/schema.rb
db/schema.rb
+6
-5
ee/app/assets/javascripts/pages/dashboard/index.js
ee/app/assets/javascripts/pages/dashboard/index.js
+0
-3
ee/app/assets/stylesheets/pages/promotions.scss
ee/app/assets/stylesheets/pages/promotions.scss
+0
-193
ee/app/helpers/ee/users_helper.rb
ee/app/helpers/ee/users_helper.rb
+0
-31
ee/app/views/shared/_gold_trial_callout.html.haml
ee/app/views/shared/_gold_trial_callout.html.haml
+0
-16
No files found.
db/schema.rb
View file @
086549d9
...
...
@@ -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:
tru
e
,
null:
false
t
.
boolean
"instance_statistics_visibility_private"
,
default:
fals
e
,
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
...
...
ee/app/assets/javascripts/pages/dashboard/index.js
deleted
100644 → 0
View file @
c58a4ea8
import
initDismissableCallout
from
'
~/dismissable_callout
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
initDismissableCallout
(
'
.js-gold-trial-callout
'
));
ee/app/assets/stylesheets/pages/promotions.scss
deleted
100644 → 0
View file @
c58a4ea8
.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
;
}
}
}
ee/app/helpers/ee/users_helper.rb
deleted
100644 → 0
View file @
c58a4ea8
# 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
ee/app/views/shared/_gold_trial_callout.html.haml
deleted
100644 → 0
View file @
c58a4ea8
-
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'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment