diff options
Diffstat (limited to 'app/helpers/dashboard_helper.rb')
-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 |