summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-09-28 15:43:52 +0200
committerTim Zallmann <tzallmann@gitlab.com>2017-09-28 15:43:52 +0200
commit59f36b4cce4888903820a6d434463b397cfa386c (patch)
treec62565c43e7d28c748bcb438bfa0b645027c34d7 /app/helpers
parent11c8b8bc3c2294ef2e3a33196619f6e61f1e8d82 (diff)
downloadgitlab-ce-59f36b4cce4888903820a6d434463b397cfa386c.tar.gz
Updated All Navigation Icons to Sprite_Icons
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/breadcrumbs_helper.rb2
-rw-r--r--app/helpers/icons_helper.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/breadcrumbs_helper.rb b/app/helpers/breadcrumbs_helper.rb
index ee1b7ed083e..adf39380b8e 100644
--- a/app/helpers/breadcrumbs_helper.rb
+++ b/app/helpers/breadcrumbs_helper.rb
@@ -25,7 +25,7 @@ module BreadcrumbsHelper
def breadcrumb_list_item(link)
content_tag "li" do
- link + icon("angle-right", class: "breadcrumbs-list-angle")
+ link + sprite_icon("angle-right", size: 8, css_class: "breadcrumbs-list-angle")
end
end
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 08e6443bd0f..ec779c1c447 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -24,9 +24,9 @@ module IconsHelper
end
def sprite_icon(icon_name, size: nil, css_class: nil)
- css_classes = size ? "s#{size}" : nil
+ css_classes = size ? "s#{size}" : ""
css_classes << " #{css_class}" unless css_class.blank?
- content_tag(:svg, content_tag(:use, "", { "xlink:href" => "#{image_path('icons.svg')}##{icon_name}" } ), class: css_classes)
+ content_tag(:svg, content_tag(:use, "", { "xlink:href" => "#{image_path('icons.svg')}##{icon_name}" } ), class: css_classes.empty? ? nil : css_classes)
end
def audit_icon(names, options = {})