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