summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/groups_helper.rb6
-rw-r--r--app/views/shared/groups/_group.html.haml3
2 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index d918d8acd22..42e09149bd7 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -28,7 +28,7 @@ module GroupsHelper
group = Group.find_by(path: group)
end
- if group && can?(current_user, :read_group, group) && group.avatar.present?
+ if group && group.avatar.present?
group.avatar.url
else
'no_group_avatar.png'
@@ -43,4 +43,8 @@ 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/views/shared/groups/_group.html.haml b/app/views/shared/groups/_group.html.haml
index fb9a8db0889..82eeb2088c8 100644
--- a/app/views/shared/groups/_group.html.haml
+++ b/app/views/shared/groups/_group.html.haml
@@ -21,6 +21,9 @@
= icon('users')
= number_with_delimiter(group.users.count)
+ %span{title: group_visibility_description(group)}
+ = visibility_level_icon(group.visibility_level, fw: false)
+
= image_tag group_icon(group), class: "avatar s40 hidden-xs"
= link_to group, class: 'group-name title' do
= group.name