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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
30f0909c
Commit
30f0909c
authored
Aug 29, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjustments to calling logic
parent
6e362e9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
app/helpers/license_helper.rb
app/helpers/license_helper.rb
+12
-12
ee/app/views/shared/promotions/_promote_burndown_charts.html.haml
...iews/shared/promotions/_promote_burndown_charts.html.haml
+1
-1
ee/app/views/shared/promotions/_promote_contribution_analytics.html.haml
...ared/promotions/_promote_contribution_analytics.html.haml
+1
-1
ee/app/views/shared/promotions/_promote_mr_features.html.haml
...pp/views/shared/promotions/_promote_mr_features.html.haml
+1
-1
No files found.
app/helpers/license_helper.rb
View file @
30f0909c
...
@@ -76,21 +76,21 @@ module LicenseHelper
...
@@ -76,21 +76,21 @@ module LicenseHelper
end
end
def
show_promotions?
(
selected_user
=
current_user
)
def
show_promotions?
(
selected_user
=
current_user
)
if
selected_user
return
false
unless
selected_user
return
@show_promotions
if
defined?
(
@show_promotions
)
@show_promotions
=
return
@show_promotions
if
defined?
(
@show_promotions
)
if
current_application_settings
.
should_check_namespace_plan?
true
@show_promotions
=
else
if
current_application_settings
.
should_check_namespace_plan?
license
=
License
.
current
true
license
.
nil?
||
license
.
expired?
else
end
license
=
License
.
current
end
license
.
nil?
||
license
.
expired?
end
end
end
def
show_project_feature_promotion?
(
project_feature
,
callout_id
=
''
)
def
show_project_feature_promotion?
(
project_feature
,
callout_id
=
nil
)
!
@project
.
feature_available?
(
project_feature
)
&&
show_promotions?
&&
show_callout?
(
callout_id
)
!
@project
.
feature_available?
(
project_feature
)
&&
show_promotions?
&&
!
callout_id
.
nil?
&&
show_callout?
(
callout_id
)
end
end
extend
self
extend
self
...
...
ee/app/views/shared/promotions/_promote_burndown_charts.html.haml
View file @
30f0909c
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
.user-callout-copy
.user-callout-copy
%h4
%h4
-
if
current_application_settings
.
should_check_namespace_plan?
-
if
current_application_settings
.
should_check_namespace_plan?
-
if
@project
.
group
?
can?
(
current_user
,
:admin_group
,
@project
.
group
)
:
@project
.
owner
==
current_user
-
if
can?
(
current_user
,
:admin_namespace
,
@project
.
namespace
)
Upgrade your plan to improve milestones with Burndown Charts.
Upgrade your plan to improve milestones with Burndown Charts.
-
elsif
@project
.
group
-
elsif
@project
.
group
Upgrade the plan for
#{
@project
.
group
.
name
}
to improve milestones with Burndown Charts.
Upgrade the plan for
#{
@project
.
group
.
name
}
to improve milestones with Burndown Charts.
...
...
ee/app/views/shared/promotions/_promote_contribution_analytics.html.haml
View file @
30f0909c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
.user-callout-copy
.user-callout-copy
%h4
%h4
-
if
current_application_settings
.
should_check_namespace_plan?
-
if
current_application_settings
.
should_check_namespace_plan?
-
if
@project
.
group
?
can?
(
current_user
,
:admin_group
,
@project
.
group
)
:
@project
.
owner
==
current_user
-
if
can?
(
current_user
,
:admin_namespace
,
@project
.
namespace
)
Upgrade your plan to activate Contribution Analytics.
Upgrade your plan to activate Contribution Analytics.
-
elsif
@project
.
group
-
elsif
@project
.
group
Upgrade the plan for
#{
@project
.
group
.
name
}
to activate Contribution Analytics.
Upgrade the plan for
#{
@project
.
group
.
name
}
to activate Contribution Analytics.
...
...
ee/app/views/shared/promotions/_promote_mr_features.html.haml
View file @
30f0909c
-
if
show_pro
ject_feature_promotion?
(
:merge_request_approvers
,
'promote_mr_features_dismissed'
)
||
show_project_feature_promotion?
(
:fast_forward_merge
,
'promote_mr_features_dismissed'
)
-
if
show_pro
motions?
&&
show_callout?
(
'promote_mr_features_dismissed'
)
&&
(
!
@project
.
feature_available?
(
:merge_request_approvers
)
||
!
@project
.
feature_available?
(
:fast_forward_merge
)
)
.user-callout.promotion-callout.append-bottom-20.js-mr-approval-callout
#promote_mr_features
{
data:
{
uid:
'promote_mr_features_dismissed'
}
}
.user-callout.promotion-callout.append-bottom-20.js-mr-approval-callout
#promote_mr_features
{
data:
{
uid:
'promote_mr_features_dismissed'
}
}
.bordered-box.content-block
.bordered-box.content-block
%button
.btn.btn-default.close.js-close-callout
{
type:
'button'
,
'aria-label'
=>
'Dismiss Merge Request promotion'
}
%button
.btn.btn-default.close.js-close-callout
{
type:
'button'
,
'aria-label'
=>
'Dismiss Merge Request promotion'
}
...
...
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