gitlab-org--gitlab-foss/app/views/snippets/_blob.html.haml

25 lines
980 B
Plaintext
Raw Normal View History

.file-holder
.file-title
%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'
= link_to "Delete", snippet_path(@snippet), method: :delete, data: { 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"
- 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
= render_markup(@snippet.file_name, @snippet.data)
- else
.file-content.code
= render 'shared/file_hljs', blob: @snippet
- else
.file-content.code
%p.nothing_here_message Empty file