Commit 12459e50 authored by Scott Hampton's avatar Scott Hampton

Refactoring and i18n fixes

Making these changes based on MR suggestions.
parent 40d15136
- status = local_assigns.fetch(:status)
- size = local_assigns.fetch(:size, 16)
- type = local_assigns.fetch(:type, 'pipeline')
- title = local_assigns.fetch(:title, "#{type.titleize}: #{status.label}")
- title = local_assigns.fetch(:title, _("%{type}: %{label}" % {type: type.titleize, label: status.label}))
- tooltip_placement = local_assigns.fetch(:tooltip_placement, "left")
- path = local_assigns.fetch(:path, status.has_details? ? status.details_path : nil)
- css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} has-tooltip"
- if status.has_details?
- if path
= link_to path, class: css_classes, title: title, data: { html: true, placement: tooltip_placement } do
= sprite_icon(status.icon, size: size)
- else
......
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