diff.html.haml revision 4e449617be908ec2af2d15bdecc72002a2dd2c8a
= repository_nav repository, :"Ontology files"
%h3 Commit message
%pre= @message
%h3 Files changed by this commit
- @changed_files.each do |file|
%li
= link_to "#file-#{file.path}" do
- if file.added?
- elsif file.deleted?
- elsif file.modified?
- elsif file.renamed?
%h3 Changes
- @changed_files.each do |file|
- if file.deleted?
= link_to file.path, '#', 'data-toggle' => 'tooltip', 'data-original-title' => 'You cannot view a deleted file',
class: 'btn btn-default disabled', name: "file-#{file.path}"
- else
= link_to file.path, fancy_repository_path(repository, path: file.path, ref: oid), class: 'btn btn-default', name: "file-#{file.path}"
- if file.deleted?
File was deleted
- elsif file.binary?
= link_to raw('<i class="icon-download-alt"></i> Download'), fancy_repository_path(repository.path, ref: oid, path: file.path), class: 'btn btn-default'
- elsif file.editable?
.diff-code
- case file.diff
- when :diff_too_large
Diff is too large to display.
- else
- file.diff.each_line do |diff_line|
= diff_line.force_encoding('UTF-8')
%br
- elsif file.mime_category == 'image'
- else
= link_to raw('<i class="icon-download-alt"></i> Download'), fancy_repository_path(repository.path, ref: oid, path: file.path), class: 'btn btn-default'