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
f363f16e
Commit
f363f16e
authored
Jun 29, 2017
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only show Contribution Analytics tab when feature available
parent
73fac3ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
app/views/layouts/nav/_group.html.haml
app/views/layouts/nav/_group.html.haml
+5
-4
spec/views/layouts/nav/ee/_group.html.haml_spec.rb
spec/views/layouts/nav/ee/_group.html.haml_spec.rb
+25
-0
No files found.
app/views/layouts/nav/_group.html.haml
View file @
f363f16e
...
...
@@ -24,10 +24,11 @@
=
link_to
group_group_members_path
(
@group
),
title:
'Members'
do
%span
Members
=
nav_link
(
path:
'analytics#show'
)
do
=
link_to
group_analytics_path
(
@group
),
title:
'Contribution Analytics'
,
data:
{
placement:
'right'
}
do
%span
Contribution Analytics
-
if
@group
.
feature_available?
(
:contribution_analytics
)
=
nav_link
(
path:
'analytics#show'
)
do
=
link_to
group_analytics_path
(
@group
),
title:
'Contribution Analytics'
,
data:
{
placement:
'right'
}
do
%span
Contribution Analytics
-
if
current_user
&&
can?
(
current_user
,
:admin_group
,
@group
)
=
nav_link
(
path:
%w[groups#projects groups#edit ldap_group_links#index hooks#index audit_events#index pipeline_quota#index]
)
do
=
link_to
edit_group_path
(
@group
),
title:
'Settings'
do
...
...
spec/views/layouts/nav/ee/_group.html.haml_spec.rb
0 → 100644
View file @
f363f16e
require
'spec_helper'
describe
'layouts/nav/_group'
do
before
do
assign
(
:group
,
create
(
:group
))
end
describe
'contribution analytics tab'
do
it
'is not visible when there is no valid license'
do
stub_licensed_features
(
contribution_analytics:
false
)
render
expect
(
rendered
).
not_to
have_text
'Contribution Analytics'
end
it
'is not visible when there is no valid license'
do
stub_licensed_features
(
contribution_analytics:
true
)
render
expect
(
rendered
).
to
have_text
'Contribution Analytics'
end
end
end
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