diff.html.haml revision 4e449617be908ec2af2d15bdecc72002a2dd2c8a
= repository_nav repository, :"Ontology files"
%h3 Commit message
%pre= @message
%h3 Files changed by this commit
%ul.changed-files-list.nav.nav-stacked.nav-tabs
- @changed_files.each do |file|
%li
= link_to "#file-#{file.path}" do
- if file.added?
%i.icon-plus
- elsif file.deleted?
%i.icon-minus
- elsif file.modified?
%i.icon-edit
- elsif file.renamed?
%i.icon-edit
= file.old_path
%i.glyphicon.glyphicon-arrow-right
= file.path
%h3 Changes
- @changed_files.each do |file|
.changed-file.well.well-small
%h2.file-name
- 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?
.alert.alert-info
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'
= image_tag fancy_repository_path(repository.path, ref: oid, path: file.path), alt: file.name
- 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'