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

38 lines
1.3 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- link_project = local_assigns.fetch(:link_project, false)
2015-09-25 12:07:36 +05:30
%li.snippet-row
2016-06-02 11:05:42 +05:30
= image_tag avatar_icon(snippet.author_email), class: "avatar s40 hidden-xs", alt: ''
.title
2014-09-02 18:07:02 +05:30
= link_to reliable_snippet_path(snippet) do
2016-09-29 09:46:39 +05:30
= snippet.title
2017-08-17 22:00:37 +05:30
- if snippet.file_name
%span.snippet-filename.monospace.hidden-xs
= snippet.file_name
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
%ul.controls
2016-09-29 09:46:39 +05:30
%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)
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
2015-09-25 12:07:36 +05:30
= link_to user_snippets_path(snippet.author) do
= snippet.author_name
2017-08-17 22:00:37 +05:30
- if link_project && snippet.project_id?
%span.hidden-xs
in
= link_to namespace_project_path(snippet.project.namespace, snippet.project) do
= snippet.project.name_with_namespace
.pull-right.snippet-updated-at
%span updated #{time_ago_with_tooltip(snippet.updated_at, placement: 'bottom')}