2016-12-09 11:54:13 -05:00
|
|
|
- link_project = local_assigns.fetch(:link_project, false)
|
2019-09-02 07:12:20 -04:00
|
|
|
- notes_count = @noteable_meta_data[snippet.id].user_notes_count
|
2016-12-09 11:54:13 -05:00
|
|
|
|
2019-12-13 13:08:06 -05:00
|
|
|
%li.snippet-row.py-3
|
2018-04-09 17:50:40 -04:00
|
|
|
= image_tag avatar_icon_for_user(snippet.author), class: "avatar s40 d-none d-sm-block", alt: ''
|
2016-02-25 13:51:05 -05:00
|
|
|
|
2016-03-18 14:02:08 -04:00
|
|
|
.title
|
2019-12-10 16:08:01 -05:00
|
|
|
= link_to gitlab_snippet_path(snippet) do
|
2016-09-05 13:57:00 -04:00
|
|
|
= snippet.title
|
2013-06-05 15:25:27 -04:00
|
|
|
|
2016-12-08 15:29:15 -05:00
|
|
|
%ul.controls
|
2016-09-05 13:57:00 -04:00
|
|
|
%li
|
2019-12-10 16:08:01 -05:00
|
|
|
= link_to gitlab_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if notes_count.zero?) do
|
2020-07-10 05:09:01 -04:00
|
|
|
= sprite_icon('comments', size: 16, css_class: 'gl-vertical-align-text-bottom')
|
2019-09-02 07:12:20 -04:00
|
|
|
= notes_count
|
2016-09-05 13:57:00 -04:00
|
|
|
%li
|
|
|
|
%span.sr-only
|
|
|
|
= visibility_level_label(snippet.visibility_level)
|
2020-07-22 20:09:43 -04:00
|
|
|
= visibility_level_icon(snippet.visibility_level)
|
2016-09-05 13:57:00 -04:00
|
|
|
|
2016-12-08 15:29:15 -05:00
|
|
|
.snippet-info
|
|
|
|
#{snippet.to_reference} ·
|
2016-12-09 11:54:13 -05:00
|
|
|
authored #{time_ago_with_tooltip(snippet.created_at, placement: 'bottom', html_class: 'snippet-created-ago')}
|
|
|
|
by
|
2019-01-04 10:51:19 -05:00
|
|
|
= link_to user_snippets_path(snippet.author), class: "js-user-link", data: { user_id: snippet.author.id } do
|
2015-08-26 18:00:06 -04:00
|
|
|
= snippet.author_name
|
2016-12-09 11:54:13 -05:00
|
|
|
- if link_project && snippet.project_id?
|
2018-05-29 15:54:25 -04:00
|
|
|
%span.d-none.d-sm-inline-block
|
2016-12-09 11:54:13 -05:00
|
|
|
in
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_path(snippet.project) do
|
2018-03-05 08:45:35 -05:00
|
|
|
= snippet.project.full_name
|
2016-12-08 15:29:15 -05:00
|
|
|
|
2018-04-09 13:42:45 -04:00
|
|
|
.float-right.snippet-updated-at
|
2016-12-08 17:13:23 -05:00
|
|
|
%span updated #{time_ago_with_tooltip(snippet.updated_at, placement: 'bottom')}
|