summaryrefslogtreecommitdiff
path: root/app/views/shared/snippets/_snippet.html.haml
blob: a316a085107e2edc6f0f7b4ef7b075ce5b16b313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%li.snippet-row
  = image_tag avatar_icon(snippet.author_email), class: "avatar s40 hidden-xs", alt: ''

  .snippet-title
    = link_to reliable_snippet_path(snippet), class: 'title' do
      = truncate(snippet.title, length: 60)
      - if snippet.private?
        %span.label.label-gray
          = icon('lock')
          private
    %span.monospace.pull-right
      = snippet.file_name

  %small.pull-right.cgray
    - if snippet.project_id?
      = link_to snippet.project.name_with_namespace, namespace_project_path(snippet.project.namespace, snippet.project)

  .snippet-info
    = link_to user_snippets_path(snippet.author) do
      = snippet.author_name
    authored #{time_ago_with_tooltip(snippet.created_at)}