summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-03-20 21:03:53 +0100
committerDouwe Maan <douwe@selenight.nl>2016-03-20 21:04:07 +0100
commit8db1292139cfdac4c29c03b876b68b9e752cf75a (patch)
tree2fcf67ada482ecf4ac90f39c858334a62b709618 /app/helpers
parent2eb19ea3ea36916bbea72a8ccab3e6d15f602ac9 (diff)
downloadgitlab-ce-8db1292139cfdac4c29c03b876b68b9e752cf75a.tar.gz
Tweaks, refactoring, and specs
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/groups_helper.rb4
-rw-r--r--app/helpers/visibility_level_helper.rb8
2 files changed, 8 insertions, 4 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 42e09149bd7..b1f0a765bb9 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -43,8 +43,4 @@ module GroupsHelper
full_title
end
end
-
- def group_visibility_description(group)
- "#{visibility_level_label(group.visibility_level)} - #{group_visibility_level_description(group.visibility_level)}"
- end
end
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb
index 7fa18ba9079..5b1bfb261a5 100644
--- a/app/helpers/visibility_level_helper.rb
+++ b/app/helpers/visibility_level_helper.rb
@@ -63,6 +63,14 @@ module VisibilityLevelHelper
end
end
+ def group_visibility_icon_description(group)
+ "#{visibility_level_label(group.visibility_level)} - #{group_visibility_level_description(group.visibility_level)}"
+ end
+
+ def project_visibility_icon_description(project)
+ "#{visibility_level_label(project.visibility_level)} - #{project_visibility_level_description(project.visibility_level)}"
+ end
+
def visibility_level_label(level)
Project.visibility_levels.key(level)
end