2013-07-13 01:45:48 -04:00
|
|
|
%h3.page-title
|
2013-07-18 06:08:48 -04:00
|
|
|
= @snippet.title
|
|
|
|
|
2013-03-24 17:16:52 -04:00
|
|
|
- if @snippet.private?
|
2013-07-18 06:08:48 -04:00
|
|
|
%span.label.label-success
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-lock
|
2013-07-18 06:08:48 -04:00
|
|
|
private
|
2013-03-24 17:16:52 -04:00
|
|
|
|
2013-07-18 06:08:48 -04:00
|
|
|
.pull-right
|
2014-06-13 13:21:48 -04:00
|
|
|
= link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do
|
2013-07-18 06:08:48 -04:00
|
|
|
Add new snippet
|
2014-06-13 13:21:48 -04:00
|
|
|
%hr
|
2013-07-18 06:08:48 -04:00
|
|
|
|
|
|
|
.append-bottom-20
|
|
|
|
.pull-right
|
2013-06-05 15:25:27 -04:00
|
|
|
= "##{@snippet.id}"
|
|
|
|
%span.light
|
|
|
|
by
|
2013-07-18 06:33:43 -04:00
|
|
|
= link_to user_snippets_path(@snippet.author) do
|
2013-10-06 14:13:56 -04:00
|
|
|
= image_tag avatar_icon(@snippet.author_email), class: "avatar avatar-inline s16"
|
2013-07-18 06:33:43 -04:00
|
|
|
= @snippet.author_name
|
2013-07-18 06:08:48 -04:00
|
|
|
|
|
|
|
.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
|
|
|
|
|
2014-06-14 05:36:46 -04:00
|
|
|
.file-holder
|
|
|
|
.file-title
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-file
|
2014-06-14 05:36:46 -04:00
|
|
|
%span.file_name
|
|
|
|
= @snippet.file_name
|
|
|
|
.options
|
|
|
|
.btn-group
|
|
|
|
- if can?(current_user, :modify_personal_snippet, @snippet)
|
|
|
|
= link_to "edit", edit_snippet_path(@snippet), class: "btn btn-small", title: 'Edit Snippet'
|
|
|
|
= link_to "raw", raw_snippet_path(@snippet), class: "btn btn-small", target: "_blank"
|
|
|
|
- if can?(current_user, :admin_personal_snippet, @snippet)
|
|
|
|
= link_to "remove", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-small btn-remove", title: 'Delete Snippet'
|
|
|
|
= render 'shared/snippets/blob'
|