summaryrefslogtreecommitdiffstats
path: root/app/helpers/icons_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/icons_helper.rb')
-rw-r--r--app/helpers/icons_helper.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 99006308e..948f68752 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -67,6 +67,29 @@ module IconsHelper
sprite_icon(icon_name, **options)
end
+ def scm_change_icon(action, name, **options)
+ icon_name = case action
+ when 'A'
+ "add"
+ when 'D'
+ "circle-minus"
+ else
+ "circle-dot-filled"
+ end
+ sprite_icon(icon_name, name, size: 14)
+ end
+
+ def notice_icon(type, **options)
+ icon_name = case type
+ when 'notice'
+ 'checked'
+ when 'warning', 'error'
+ 'warning'
+ end
+
+ sprite_icon(icon_name, **options)
+ end
+
private
def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil)