summaryrefslogtreecommitdiff
path: root/app/views/snippets/show.html.haml
blob: 5cf1fefe5f08c54bc1160ddfc4e9acdbfd66da54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
%h3.page-title
  = @snippet.title

  - if @snippet.private?
    %span.label.label-success
      %i.icon-lock
      private

  .pull-right
    = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do
      Add new snippet


.append-bottom-20
  .pull-right
    = "##{@snippet.id}"
    %span.light
      by
      = link_to user_snippets_path(@snippet.author) do
        = image_tag gravatar_icon(@snippet.author_email), class: "avatar avatar-inline s16"
        = @snippet.author_name

  .back-link
    - if @snippet.author == current_user
      = link_to user_snippets_path(current_user) do
        ← my snippets
    - else
      = link_to snippets_path do
        ← discover snippets

%div= render 'blob'