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
f5e57723
Commit
f5e57723
authored
Sep 20, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed for a @project check if this is used in the context of a group
parent
871e051b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
app/helpers/license_helper.rb
app/helpers/license_helper.rb
+3
-1
ee/app/views/shared/promotions/_promotion_link_project.html.haml
...views/shared/promotions/_promotion_link_project.html.haml
+5
-3
No files found.
app/helpers/license_helper.rb
View file @
f5e57723
...
...
@@ -75,8 +75,10 @@ module LicenseHelper
end
def
upgrade_plan_url
if
@project
.
group
if
@project
&&
@project
.
group
group_billings_path
(
@project
.
group
)
elsif
@group
group_billings_path
(
@group
)
else
profile_billings_path
end
...
...
ee/app/views/shared/promotions/_promotion_link_project.html.haml
View file @
f5e57723
-
short_form
=
local_assigns
.
fetch
:short_form
,
false
-
if
current_application_settings
.
should_check_namespace_plan?
-
if
can?
(
current_user
,
:admin_namespace
,
@project
.
namespace
)
-
if
(
@project
&&
can?
(
current_user
,
:admin_namespace
,
@project
.
namespace
))
||
(
@group
&&
can?
(
current_user
,
:admin_group
,
@group
)
)
=
link_to
'Upgrade your plan'
,
upgrade_plan_url
,
class:
'btn btn-primary'
-
elsif
@project
.
group
-
elsif
@project
&&
@project
.
group
%p
Contact an owner of group
#{
@project
.
group
.
name
}
to upgrade the plan.
-
else
-
elsif
@group
%p
Contact an owner of group
#{
@group
.
name
}
to upgrade the plan.
-
elsif
@project
-
owner
=
@project
.
namespace
.
owner
%p
Contact owner
#{
link_to
(
owner
.
name
,
user_path
(
owner
))
}
to upgrade the plan.
-
elsif
current_user
&
.
admin?
...
...
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