diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-03 15:14:04 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-17 11:52:22 +0100 |
commit | 14d08d1400376a0bbae18890a54ff2b961062a32 (patch) | |
tree | fb3dd0ede7b928ca357cd67a4c2aef9332547883 /app/helpers | |
parent | 05dcec95aa246640e69d0f484f94289c3e8a6160 (diff) | |
download | gitlab-ce-14d08d1400376a0bbae18890a54ff2b961062a32.tar.gz |
Updated design of markdown buttons
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 067a00660aa..a0dafc52622 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -185,4 +185,17 @@ module GitlabMarkdownHelper '' end end + + def markdown_toolbar_button(options = {}) + data = options[:data].merge({ container: "body" }) + content_tag :button, + type: "button", + class: "toolbar-btn js-md has-tooltip hidden-xs", + tabindex: -1, + data: data, + title: options[:title], + aria: { label: options[:title] } do + icon(options[:icon]) + end + end end |