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

51 lines
2.1 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
.detail-page-header
.detail-page-header-body
2020-07-28 23:09:34 +05:30
.snippet-box.has-tooltip.inline.gl-mr-2{ 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)
2020-10-24 23:57:45 +05:30
= visibility_level_icon(@snippet.visibility_level)
2018-03-17 18:26:18 +05:30
%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
2020-06-23 00:09:42 +05:30
%h2.snippet-title.gl-mt-0.mb-3
2017-08-17 22:00:37 +05:30
= markdown_field(@snippet, :title)
2017-09-10 17:25:29 +05:30
- if @snippet.description.present?
2020-06-23 00:09:42 +05:30
.description
2019-07-07 11:18:12 +05:30
.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
2020-05-24 23:13:21 +05:30
%button.btn.btn-svg.embed-toggle.input-group-text{ '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")
2020-01-01 13:55:28 +05:30
= snippet_embed_input(@snippet)
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