diff.html.haml revision 5638f050d3d998b69dbdcd69f757efff63880950
= repository_nav repository, :files
- @changed_files.each do |file|
%li
= link_to "#file-#{file[:path]}" do
- if file[:type] == :add
- elsif file[:type] == :delete
- elsif file[:type] == :change
= file[:path]
- @changed_files.each do |file|
- if file[:type] == :delete
= link_to file[:path], '#', 'data-toggle' => 'tooltip', 'data-original-title' => 'You cannot view a deleted file',
class: 'btn disabled', name: "file-#{file[:path]}"
- else
= link_to file[:path], fancy_repository_path(repository, path: file[:path], oid: @oid), class: 'btn', name: "file-#{file[:path]}"
- if file[:type] == :delete
File was deleted
- elsif file[:editable]
.diff-code
= file[:diff].html_safe
- elsif file[:mime_category] == 'image'
= image_tag fancy_repository_path(repository.path, oid: @oid, path: file[:path]), alt: file[:name]
- else
= link_to raw('<i class="icon-download-alt"></i> Download'), fancy_repository_path(repository.path, oid: @oid, path: file[:path]), class: 'btn'