diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/helpers/button_helper.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/helpers/button_helper.rb')
-rw-r--r-- | app/helpers/button_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index 27d6ee57d8b..eb30ffc0093 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -22,7 +22,7 @@ module ButtonHelper def clipboard_button(data = {}) css_class = data[:class] || 'btn-clipboard btn-transparent' title = data[:title] || _('Copy') - button_text = data[:button_text] || '' + button_text = data[:button_text] || nil hide_tooltip = data[:hide_tooltip] || false hide_button_icon = data[:hide_button_icon] || false item_prop = data[:itemprop] || nil @@ -55,8 +55,8 @@ module ButtonHelper } content_tag :button, button_attributes do - concat(sprite_icon('copy-to-clipboard')) unless hide_button_icon - concat(button_text) + concat(sprite_icon('copy-to-clipboard', css_class: ['gl-icon', *('gl-button-icon' unless button_text.nil?)].join(' '))) unless hide_button_icon + concat(content_tag(:span, button_text, class: 'gl-button-text')) unless button_text.nil? end end |