summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-10-09 10:45:23 +0200
committerTim Zallmann <tzallmann@gitlab.com>2017-10-09 10:45:23 +0200
commit5f41cddf80b5bcf7b409e200b21cd26761ad9afd (patch)
tree4f66ed0dfdc8050ae09c4363319432a116525fa8 /app/helpers
parent9f228449a53e1cc5661aba2645a49ecbbf4d5794 (diff)
downloadgitlab-ce-5f41cddf80b5bcf7b409e200b21cd26761ad9afd.tar.gz
Based on MR simplified the logic
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/helpers/groups_helper.rb16
2 files changed, 3 insertions, 15 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 466e1170181..8d02d5de5c3 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -41,7 +41,7 @@ module ApplicationHelper
end
if project.avatar_url
- image_tag project.avatar_url(use_asset_path: project.public?), options
+ image_tag project.avatar_url, options
else # generated icon
project_identicon(project, options)
end
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index b366e627e01..655b9d02c1e 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -1,7 +1,4 @@
-require 'uri'
-
module GroupsHelper
- include Gitlab::CurrentSettings
def can_change_group_visibility_level?(group)
can?(current_user, :change_visibility_level, group)
@@ -22,12 +19,7 @@ module GroupsHelper
end
if group.avatar_url
- if group.private?
- options[:use_original_source] = true
- group.avatar_url(use_asset_path: false)
- else
- group.avatar_url
- end
+ group.avatar_url
else # No Avatar Icon
ActionController::Base.helpers.image_path('no_group_avatar.png')
end
@@ -107,11 +99,7 @@ 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?
- if group.private?
- group_icon(group, class: "avatar-tile", width: 15, height: 15, use_original_source: true)
- else
- group_icon(group, class: "avatar-tile", width: 15, height: 15)
- end
+ group_icon(group, class: "avatar-tile", width: 15, height: 15)
else
""
end