debian-mirror-gitlab/app/views/shared/snippets/_header.html.haml

51 lines
2.3 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
.detail-page-header
.detail-page-header-body
2019-07-07 11:18:12 +05:30
.snippet-box.qa-snippet-box.has-tooltip.inline.append-right-5{ title: snippet_visibility_level_description(@snippet.visibility_level, @snippet), data: { container: "body" } }
2018-03-17 18:26:18 +05:30
%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-11-08 19:23:39 +05:30
by #{link_to_member(@project, @snippet.author, size: 24, author_class: "author item-title", avatar_class: "d-none d-sm-inline")}
2018-11-18 11:00:15 +05:30
= user_status(@snippet.author)
2015-11-26 14:37:03 +05:30
2018-03-17 18:26:18 +05:30
.detail-page-header-actions
2015-12-23 02:04:40 +05:30
- if @snippet.project_id?
= render "projects/snippets/actions"
- else
= render "snippets/actions"
2017-09-10 17:25:29 +05:30
.snippet-header.limited-header-width
2019-12-04 20:38:33 +05:30
%h2.snippet-title.prepend-top-0.mb-3.qa-snippet-title
2017-08-17 22:00:37 +05:30
= markdown_field(@snippet, :title)
2017-09-10 17:25:29 +05:30
- if @snippet.description.present?
2019-07-07 11:18:12 +05:30
.description.qa-snippet-description
.md
2017-09-10 17:25:29 +05:30
= markdown_field(@snippet, :description)
%textarea.hidden.js-task-list-field
= @snippet.description
2018-10-15 14:42:47 +05:30
- if @snippet.updated_at != @snippet.created_at
2019-12-04 20:38:33 +05:30
= edited_time_ago_with_tooltip(@snippet, placement: 'bottom', exclude_author: true)
2018-10-15 14:42:47 +05:30
2019-01-03 12:48:30 +05:30
- if @snippet.embeddable?
2018-10-15 14:42:47 +05:30
.embed-snippet
.input-group
2018-11-08 19:23:39 +05:30
.input-group-prepend
2019-07-07 11:18:12 +05:30
%button.btn.btn-svg.embed-toggle.input-group-text.qa-embed-type{ 'data-toggle': 'dropdown', type: 'button' }
2018-10-15 14:42:47 +05:30
%span.js-embed-action= _("Embed")
2018-11-08 19:23:39 +05:30
= sprite_icon('angle-down', size: 12, css_class: 'caret-down')
2018-10-15 14:42:47 +05:30
%ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list
%li
%button.js-embed-btn.btn.btn-transparent.is-active{ type: 'button' }
%strong.embed-toggle-list-item= _("Embed")
%li
%button.js-share-btn.btn.btn-transparent{ type: 'button' }
%strong.embed-toggle-list-item= _("Share")
%input.js-snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed }
2018-11-08 19:23:39 +05:30
.input-group-append
2019-12-21 20:55:43 +05:30
= clipboard_button(title: _('Copy'), class: 'js-clipboard-btn snippet-clipboard-btn btn btn-default', target: '.js-snippet-url-area')
2018-10-15 14:42:47 +05:30
.clearfix