diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-29 12:06:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-29 12:06:10 +0300 |
commit | 833eadad8cac85b99871842854c9a676a607e2da (patch) | |
tree | c1217414611dd62eef1da3e8ed79603222ec263a /app/helpers | |
parent | acdf997e1abea2d1f7b6964b19ee493b1e7c051d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/dashboard_helper.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index 518cb7c9714..679622897aa 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -27,16 +27,25 @@ module DashboardHelper false end - def feature_entry(title, href: nil, enabled: true) + def feature_entry(title, href: nil, enabled: true, doc_href: nil) enabled_text = enabled ? 'on' : 'off' label = "#{title}: status #{enabled_text}" link_or_title = href && enabled ? tag.a(title, href: href) : title tag.p(aria: { label: label }) do concat(link_or_title) + concat(tag.span(class: ['light', 'float-right']) do - concat(boolean_to_icon(enabled)) + boolean_to_icon(enabled) end) + + if doc_href.present? + link_to_doc = link_to(sprite_icon('question', size: 16), doc_href, + class: 'prepend-left-5', title: _('Documentation'), + target: '_blank', rel: 'noopener noreferrer') + + concat(link_to_doc) + end end end |