2013-07-13 06:52:47 +00:00
|
|
|
.file-holder
|
|
|
|
.file-title
|
2012-11-26 04:14:05 +00:00
|
|
|
%i.icon-file
|
|
|
|
%strong= @snippet.file_name
|
|
|
|
%span.options
|
2013-06-05 19:25:27 +00:00
|
|
|
.btn-group.tree-btn-group.pull-right
|
|
|
|
- if @snippet.author == current_user
|
|
|
|
= link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet'
|
2013-06-24 22:55:37 +00:00
|
|
|
= link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet'
|
2013-06-05 19:25:27 +00:00
|
|
|
= link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
|
2013-11-20 15:29:50 +00:00
|
|
|
- unless @snippet.content.empty?
|
|
|
|
- if gitlab_markdown?(@snippet.file_name)
|
|
|
|
.file-content.wiki
|
|
|
|
= preserve do
|
|
|
|
= markdown(@snippet.data)
|
|
|
|
- elsif markup?(@snippet.file_name)
|
|
|
|
.file-content.wiki
|
|
|
|
= raw GitHub::Markup.render(@snippet.file_name, @snippet.data)
|
2012-11-26 04:14:05 +00:00
|
|
|
- else
|
2013-11-20 15:29:50 +00:00
|
|
|
.file-content.code
|
|
|
|
%div{class: user_color_scheme_class}
|
|
|
|
= raw @snippet.colorize(formatter: :gitlab)
|
|
|
|
- else
|
|
|
|
.file-content.code
|
2012-11-26 04:14:05 +00:00
|
|
|
%p.nothing_here_message Empty file
|