diff options
Diffstat (limited to 'app/views/shared/snippets/_header.html.haml')
-rw-r--r-- | app/views/shared/snippets/_header.html.haml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/shared/snippets/_header.html.haml b/app/views/shared/snippets/_header.html.haml index 12df79a28c7..de14356b82f 100644 --- a/app/views/shared/snippets/_header.html.haml +++ b/app/views/shared/snippets/_header.html.haml @@ -1,3 +1,6 @@ +- content_for :page_specific_javascripts do + = page_specific_javascript_bundle_tag('snippet_embed') + .detail-page-header .detail-page-header-body .snippet-box.has-tooltip.inline.append-right-5{ title: snippet_visibility_level_description(@snippet.visibility_level, @snippet), data: { container: "body" } } @@ -27,3 +30,21 @@ = markdown_field(@snippet, :description) %textarea.hidden.js-task-list-field = @snippet.description + - if public_snippet? + .pull-right + .input-group + .input-group-btn + %button.btn.btn-default.dropdown-toggle{ 'data-toggle': 'dropdown' } + %span#embed-action Embed + = sprite_icon('angle-down', size: 16) + .dropdown-menu + %ul + %li + %a#embed-btn{ href: "#" }Embed + %li + %a#share-btn{ href: "#" }Share + %input#snippet-url-area.form-control{ type: "text", autocomplete: 'off', value: snippet_embed } + .input-group-btn + %a#clipboard-btn.btn.btn-default{ title: "Copy to clipboard", data: { toggle: "tooltip", placement: "bottom", title: "Copy source to clipboard", container: "body", clipboard_target: '#snippet-url-area' } } + = sprite_icon('duplicate', size: 16) + .clearfix |