summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-03 15:14:04 +0100
committerPhil Hughes <me@iamphill.com>2016-06-17 11:52:22 +0100
commit14d08d1400376a0bbae18890a54ff2b961062a32 (patch)
treefb3dd0ede7b928ca357cd67a4c2aef9332547883 /app/helpers
parent05dcec95aa246640e69d0f484f94289c3e8a6160 (diff)
downloadgitlab-ce-14d08d1400376a0bbae18890a54ff2b961062a32.tar.gz
Updated design of markdown buttons
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/gitlab_markdown_helper.rb13
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