2017-11-28 16:35:01 -05:00
|
|
|
.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" } }
|
|
|
|
%span.sr-only
|
|
|
|
= visibility_level_label(@snippet.visibility_level)
|
|
|
|
= visibility_level_icon(@snippet.visibility_level, fw: false)
|
|
|
|
%span.creator
|
|
|
|
Authored
|
|
|
|
= time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago')
|
2018-04-17 17:23:22 -04:00
|
|
|
by #{link_to_member(@project, @snippet.author, size: 24, author_class: "author item-title", avatar_class: "d-none d-sm-inline")}
|
2018-07-16 12:18:52 -04:00
|
|
|
= user_status(@snippet.author)
|
2015-10-14 08:12:08 -04:00
|
|
|
|
2017-11-28 16:35:01 -05:00
|
|
|
.detail-page-header-actions
|
2015-12-16 10:13:22 -05:00
|
|
|
- if @snippet.project_id?
|
|
|
|
= render "projects/snippets/actions"
|
|
|
|
- else
|
|
|
|
= render "snippets/actions"
|
2015-12-02 08:50:12 -05:00
|
|
|
|
2017-06-23 06:45:08 -04:00
|
|
|
.snippet-header.limited-header-width
|
2016-12-09 12:48:53 -05:00
|
|
|
%h2.snippet-title.prepend-top-0.append-bottom-0
|
|
|
|
= markdown_field(@snippet, :title)
|
|
|
|
|
2017-05-29 03:54:35 -04:00
|
|
|
- if @snippet.description.present?
|
|
|
|
.description
|
|
|
|
.wiki
|
|
|
|
= markdown_field(@snippet, :description)
|
|
|
|
%textarea.hidden.js-task-list-field
|
|
|
|
= @snippet.description
|
2018-02-21 13:17:46 -05:00
|
|
|
|
|
|
|
- if @snippet.updated_at != @snippet.created_at
|
|
|
|
= edited_time_ago_with_tooltip(@snippet, placement: 'bottom', html_class: 'snippet-edited-ago', exclude_author: true)
|
|
|
|
|
2018-12-11 01:28:06 -05:00
|
|
|
- if @snippet.embeddable?
|
2018-02-22 09:04:35 -05:00
|
|
|
.embed-snippet
|
2018-02-06 08:33:18 -05:00
|
|
|
.input-group
|
2018-05-31 12:50:36 -04:00
|
|
|
.input-group-prepend
|
|
|
|
%button.btn.btn-svg.embed-toggle.input-group-text{ 'data-toggle': 'dropdown', type: 'button' }
|
2018-03-07 08:06:16 -05:00
|
|
|
%span.js-embed-action= _("Embed")
|
2018-05-31 12:50:36 -04:00
|
|
|
= sprite_icon('angle-down', size: 12, css_class: 'caret-down')
|
2018-02-22 09:04:35 -05:00
|
|
|
%ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list
|
2018-02-21 12:04:45 -05:00
|
|
|
%li
|
2018-03-07 08:06:16 -05:00
|
|
|
%button.js-embed-btn.btn.btn-transparent.is-active{ type: 'button' }
|
2018-03-06 14:28:15 -05:00
|
|
|
%strong.embed-toggle-list-item= _("Embed")
|
2018-02-21 12:04:45 -05:00
|
|
|
%li
|
2018-03-07 08:06:16 -05:00
|
|
|
%button.js-share-btn.btn.btn-transparent{ type: 'button' }
|
2018-03-06 14:28:15 -05:00
|
|
|
%strong.embed-toggle-list-item= _("Share")
|
2018-03-07 08:06:16 -05:00
|
|
|
%input.js-snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed }
|
2018-05-31 12:50:36 -04:00
|
|
|
.input-group-append
|
|
|
|
= clipboard_button(title: s_('Copy to clipboard'), class: 'js-clipboard-btn snippet-clipboard-btn btn btn-default', target: '.js-snippet-url-area')
|
2018-02-06 08:33:18 -05:00
|
|
|
.clearfix
|