2016-12-09 11:54:13 -05:00
|
|
|
- link_project = local_assigns.fetch(:link_project, false)
|
|
|
|
|
2015-08-26 18:00:06 -04:00
|
|
|
%li.snippet-row
|
2016-02-25 13:51:05 -05:00
|
|
|
= image_tag avatar_icon(snippet.author_email), class: "avatar s40 hidden-xs", alt: ''
|
|
|
|
|
2016-03-18 14:02:08 -04:00
|
|
|
.title
|
|
|
|
= link_to reliable_snippet_path(snippet) do
|
2016-09-05 13:57:00 -04:00
|
|
|
= snippet.title
|
2016-12-08 15:29:15 -05:00
|
|
|
- if snippet.file_name
|
|
|
|
%span.snippet-filename.monospace.hidden-xs
|
|
|
|
= snippet.file_name
|
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
|
|
|
|
- note_count = snippet.notes.user.count
|
|
|
|
= link_to reliable_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if note_count.zero?) do
|
|
|
|
= icon('comments')
|
|
|
|
= note_count
|
|
|
|
%li
|
|
|
|
%span.sr-only
|
|
|
|
= visibility_level_label(snippet.visibility_level)
|
|
|
|
= visibility_level_icon(snippet.visibility_level, fw: false)
|
|
|
|
|
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
|
2015-08-26 18:00:06 -04:00
|
|
|
= link_to user_snippets_path(snippet.author) do
|
|
|
|
= snippet.author_name
|
2016-12-09 11:54:13 -05:00
|
|
|
- if link_project && snippet.project_id?
|
|
|
|
%span.hidden-xs
|
|
|
|
in
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_path(snippet.project) do
|
2016-12-09 11:54:13 -05:00
|
|
|
= snippet.project.name_with_namespace
|
2016-12-08 15:29:15 -05:00
|
|
|
|
|
|
|
.pull-right.snippet-updated-at
|
2016-12-08 17:13:23 -05:00
|
|
|
%span updated #{time_ago_with_tooltip(snippet.updated_at, placement: 'bottom')}
|