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

16 lines
674 B
Text
Raw Normal View History

.file-holder
.file-title
2013-03-23 15:13:51 -04:00
%i.icon-file
%strong= @snippet.file_name
%span.options
2013-06-05 15:25:27 -04:00
.btn-group.tree-btn-group.pull-right
- if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user
= link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-tiny", title: 'Edit Snippet'
= link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank"
.file-content.code
2013-03-23 15:13:51 -04:00
- unless @snippet.content.empty?
%div{class: user_color_scheme_class}
= raw @snippet.colorize(formatter: :gitlab)
- else
%p.nothing_here_message Empty file