Commit c8b2aa8d authored by Grzegorz Bizon's avatar Grzegorz Bizon

Simplify ci status helper with detailed status

parent 40a11807
...@@ -36,10 +36,11 @@ module CiStatusHelper ...@@ -36,10 +36,11 @@ module CiStatusHelper
end end
def ci_icon_for_status(status) def ci_icon_for_status(status)
icon_name =
if detailed_status?(status) if detailed_status?(status)
status.icon return custom_icon(status.icon)
else end
icon_name =
case status case status
when 'success' when 'success'
'icon_status_success' 'icon_status_success'
...@@ -60,7 +61,6 @@ module CiStatusHelper ...@@ -60,7 +61,6 @@ module CiStatusHelper
else else
'icon_status_canceled' 'icon_status_canceled'
end end
end
custom_icon(icon_name) custom_icon(icon_name)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment