diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-10-11 00:27:09 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-10-11 00:27:09 +0300 |
commit | 0e0984952b458a617cf1f95de8b8fb88ed014d6a (patch) | |
tree | e4afd2044d31512a4baef237a7de47587085b130 /app/helpers/button_helper.rb | |
parent | 5196f6028cf57dc02c25f95edbb933e3f403b016 (diff) | |
parent | 8592e992a0da4b966f9407ffc91f88ecd7fd750c (diff) |
Merge branch 'mr-file-path-copy-btn' into 'master'
Added copy file path button to diffs
## What does this MR do?
Adds a copy file path button in the header of diff files.
## Screenshots (if relevant)
![Screen_Shot_2016-10-10_at_09.59.48](/uploads/1aedd5033bb3c1893023bb8c8d99a708/Screen_Shot_2016-10-10_at_09.59.48.png)
## What are the relevant issue numbers?
Closes #23108
See merge request !6769
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" |