Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-03-22 02:09:20 +0300
committerDouwe Maan <douwe@selenight.nl>2016-03-22 02:09:20 +0300
commit31266c5be4748f57a7d56bbcc6f06d570cbf5356 (patch)
tree1ee744a7303335cf1a270d92ec6b9e955a52cace /app/helpers/visibility_level_helper.rb
parentae7b2ef62cdf61c990f914d776a6fdfc2bc49fa2 (diff)
Address feedback
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r--app/helpers/visibility_level_helper.rb23
1 files changed, 16 insertions, 7 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb
index 5b1bfb261a5..3a83ae15dd8 100644
--- a/app/helpers/visibility_level_helper.rb
+++ b/app/helpers/visibility_level_helper.rb
@@ -40,11 +40,11 @@ module VisibilityLevelHelper
def group_visibility_level_description(level)
case level
when Gitlab::VisibilityLevel::PRIVATE
- "The group can be accessed only by members."
+ "The group and its projects can only be viewed by members."
when Gitlab::VisibilityLevel::INTERNAL
- "The group can be accessed by any logged user."
+ "The group and any internal projects can be viewed by any logged in user."
when Gitlab::VisibilityLevel::PUBLIC
- "The group can be accessed without any authentication."
+ "The group and any public projects can be viewed without any authentication."
end
end
@@ -63,12 +63,21 @@ module VisibilityLevelHelper
end
end
- def group_visibility_icon_description(group)
- "#{visibility_level_label(group.visibility_level)} - #{group_visibility_level_description(group.visibility_level)}"
+ def visibility_icon_description(form_model)
+ case form_model
+ when Project
+ project_visibility_icon_description(form_model.visibility_level)
+ when Group
+ group_visibility_icon_description(form_model.visibility_level)
+ end
+ end
+
+ def group_visibility_icon_description(level)
+ "#{visibility_level_label(level)} - #{group_visibility_level_description(level)}"
end
- def project_visibility_icon_description(project)
- "#{visibility_level_label(project.visibility_level)} - #{project_visibility_level_description(project.visibility_level)}"
+ def project_visibility_icon_description(level)
+ "#{visibility_level_label(level)} - #{project_visibility_level_description(level)}"
end
def visibility_level_label(level)