diff options
author | Scott Hampton <shampton@gitlab.com> | 2019-02-27 01:26:01 +0300 |
---|---|---|
committer | Scott Hampton <shampton@gitlab.com> | 2019-02-27 01:26:01 +0300 |
commit | 12459e507dc853239c70a1ef302de01c5a682542 (patch) | |
tree | 81e7bc522d90670384be1151900efc2482822fd5 /app/views/ci | |
parent | 40d15136352958206685197d4176f15781089849 (diff) |
Refactoring and i18n fixes
Making these changes based on MR suggestions.
Diffstat (limited to 'app/views/ci')
-rw-r--r-- | app/views/ci/status/_icon.html.haml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/ci/status/_icon.html.haml b/app/views/ci/status/_icon.html.haml index f406eb4b5a3..64119d73e03 100644 --- a/app/views/ci/status/_icon.html.haml +++ b/app/views/ci/status/_icon.html.haml @@ -1,12 +1,12 @@ - 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 |