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
f97e532e
Commit
f97e532e
authored
Jul 23, 2018
by
Jamie Schembri
Committed by
Rémy Coutable
Jul 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #47379 - Project visibility tooltip
parent
6d5edce8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
app/helpers/visibility_level_helper.rb
app/helpers/visibility_level_helper.rb
+2
-3
changelogs/unreleased/project-visibility-tooltip.yml
changelogs/unreleased/project-visibility-tooltip.yml
+5
-0
spec/helpers/visibility_level_helper_spec.rb
spec/helpers/visibility_level_helper_spec.rb
+23
-0
No files found.
app/helpers/visibility_level_helper.rb
View file @
f97e532e
...
...
@@ -126,10 +126,9 @@ module VisibilityLevelHelper
end
def
visibility_icon_description
(
form_model
)
case
form_model
when
Project
if
form_model
.
respond_to?
(
:visibility_level_allowed_as_fork?
)
project_visibility_icon_description
(
form_model
.
visibility_level
)
when
Group
elsif
form_model
.
respond_to?
(
:visibility_level_allowed_by_sub_groups?
)
group_visibility_icon_description
(
form_model
.
visibility_level
)
end
end
...
...
changelogs/unreleased/project-visibility-tooltip.yml
0 → 100644
View file @
f97e532e
---
title
:
Fix project visibility tooltip
merge_request
:
20535
author
:
Jamie Schembri
type
:
fixed
spec/helpers/visibility_level_helper_spec.rb
View file @
f97e532e
...
...
@@ -6,6 +6,29 @@ describe VisibilityLevelHelper do
let
(
:personal_snippet
)
{
build
(
:personal_snippet
)
}
let
(
:project_snippet
)
{
build
(
:project_snippet
)
}
describe
'visibility_icon_description'
do
context
'used with a Project'
do
it
'delegates projects to #project_visibility_icon_description'
do
expect
(
visibility_icon_description
(
project
))
.
to
match
/project/i
end
context
'used with a ProjectPresenter'
do
it
'delegates projects to #project_visibility_icon_description'
do
expect
(
visibility_icon_description
(
project
.
present
))
.
to
match
/project/i
end
end
context
'used with a Group'
do
it
'delegates groups to #group_visibility_icon_description'
do
expect
(
visibility_icon_description
(
group
))
.
to
match
/group/i
end
end
end
end
describe
'visibility_level_description'
do
context
'used with a Project'
do
it
'delegates projects to #project_visibility_level_description'
do
...
...
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