diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-10 11:59:35 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-10 11:59:35 +0300 |
commit | 8592e992a0da4b966f9407ffc91f88ecd7fd750c (patch) | |
tree | 40e568000e4fda4922468ed72eb4af95a2f94e2f /app/helpers/button_helper.rb | |
parent | 4e963fed42ad518caa7353d361a38a1250c99c41 (diff) |
Added copy file path button to diffs
Closes #23108
Diffstat (limited to 'app/helpers/button_helper.rb')
-rw-r--r-- | app/helpers/button_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index b478580978b..a695aceea76 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -15,10 +15,11 @@ module ButtonHelper # # See http://clipboardjs.com/#usage def clipboard_button(data = {}) + css_class = data[:class] || 'btn-clipboard' data = { toggle: 'tooltip', placement: 'bottom', container: 'body' }.merge(data) content_tag :button, icon('clipboard'), - class: "btn btn-clipboard", + class: "btn #{css_class}", data: data, type: :button, title: "Copy to Clipboard" |