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
32
33
34
35
36
37
38
39
40
41
42
|
- page_title @snippet.title, "Snippets"
.snippet
.snippet-details
.page-title
- if @snippet.private?
.snippet-box.snippet-box-locked
%i.fa.fa-lock
Private
%span.snippet-id Snippet ##{@snippet.id}
%span.creator
· created by #{link_to_member(@project, @snippet.author, size: 24)}
·
= time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago')
- if @snippet.updated_at != @snippet.created_at
%span
·
= icon('edit', title: 'edited')
= time_ago_with_tooltip(@snippet.updated_at, placement: 'bottom', html_class: 'snippet_edited_ago')
.pull-right
= link_to new_snippet_path, class: 'btn btn-grouped new-snippet-link', title: "New Snippet" do
= icon('plus')
new snippet
= link_to "remove", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-grouped btn-remove", title: 'Delete Snippet'
- if can?(current_user, :update_personal_snippet, @snippet)
= link_to edit_snippet_path(@snippet), class: "btn btn-grouped issuabled-edit" do
= icon('pencil-square-o')
Edit
.gray-content-block.middle-block
%h2.snippet-title
= gfm escape_once(@snippet.title)
.file-holder
.file-title
%i.fa.fa-file
%strong
= @snippet.file_name
.file-actions
.btn-group
= link_to "raw", raw_snippet_path(@snippet), class: "btn btn-sm", target: "_blank"
= render 'shared/snippets/blob'
|