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

33 lines
1.1 KiB
Text
Raw Normal View History

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
2014-09-02 18:07:02 +05:30
- if snippet.private?
2016-09-29 09:46:39 +05:30
%span.label.label-gray.hidden-xs
2016-06-02 11:05:42 +05:30
= icon('lock')
2014-09-02 18:07:02 +05:30
private
2016-09-29 09:46:39 +05:30
%span.monospace.pull-right.hidden-xs
2014-09-02 18:07:02 +05:30
= snippet.file_name
2016-09-29 09:46:39 +05:30
%ul.controls.visible-xs
%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)
%small.pull-right.cgray.hidden-xs
2014-09-02 18:07:02 +05:30
- if snippet.project_id?
2015-04-26 12:48:37 +05:30
= link_to snippet.project.name_with_namespace, namespace_project_path(snippet.project.namespace, snippet.project)
2014-09-02 18:07:02 +05:30
2016-09-29 09:46:39 +05:30
.snippet-info.hidden-xs
2015-09-25 12:07:36 +05:30
= link_to user_snippets_path(snippet.author) do
= snippet.author_name
authored #{time_ago_with_tooltip(snippet.created_at)}