gitlabhq/app/views/snippets/show.html.haml

27 lines
821 B
Plaintext
Raw Normal View History

2011-10-27 08:46:21 +02:00
- if !@snippet.expired?
%h2
= "Snippet ##{@snippet.id} - #{@snippet.title}"
2011-10-16 23:07:10 +02:00
2011-10-27 08:46:21 +02:00
.view_file
.view_file_header
%strong
= @snippet.file_name
%br/
.view_file_content
:erb
<%= raw @snippet.colorize %>
2011-10-16 23:07:10 +02:00
2011-10-27 08:46:21 +02:00
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
= link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
.clear
%br
.snippet_notes= render "notes/notes"
2011-10-16 23:07:10 +02:00
2011-10-27 08:46:21 +02:00
.clear
2011-10-16 23:07:10 +02:00
2011-10-27 08:46:21 +02:00
- else
%h2
Sorry, this snipped is no longer exists