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:
authorTim Zallmann <tzallmann@gitlab.com>2017-09-22 16:49:56 +0300
committerTim Zallmann <tzallmann@gitlab.com>2017-10-04 15:26:33 +0300
commit79c80de99d511d084cff072bd90192ffe8ba4cda (patch)
treee2bcf7d07fdefabb30b899e64f41ee766fcb771a /app/helpers/groups_helper.rb
parent4a0f720a502ac02423cb9db20727ba386de3e1f1 (diff)
Making private project avatars use local paths + Some Group Icons
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r--app/helpers/groups_helper.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 82bceddf1f0..091d98a2c94 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -12,7 +12,7 @@ module GroupsHelper
group = Group.find_by_full_path(group)
end
- group.try(:avatar_url) || ActionController::Base.helpers.image_path('no_group_avatar.png')
+ group.try(:avatar_url, use_asset_path: false) || ActionController::Base.helpers.image_path('no_group_avatar.png')
end
def group_title(group, name = nil, url = nil)
@@ -89,7 +89,12 @@ module GroupsHelper
link_to(group_path(group), class: "group-path #{'breadcrumb-item-text' unless for_dropdown} js-breadcrumb-item-text #{'hidable' if hidable}") do
output =
if (group.try(:avatar_url) || show_avatar) && !Rails.env.test?
- image_tag(group_icon(group), class: "avatar-tile", width: 15, height: 15)
+ if group.private?
+ puts "GROUP IS PRIVATE : " + group_icon(group)
+ image_tag(group_icon(group), class: "avatar-tile", width: 15, height: 15, use_original_source: true)
+ else
+ image_tag(group_icon(group), class: "avatar-tile", width: 15, height: 15)
+ end
else
""
end