gitlab-org--gitlab-foss/app/views/projects/edit_tree/preview.html.haml

27 lines
1.1 KiB
Text
Raw Normal View History

2014-04-15 11:02:02 -04:00
.diff-file
.diff-content
- if gitlab_markdown?(@blob.name)
2014-04-15 11:02:02 -04:00
.file-content.wiki
= preserve do
= markdown(@content)
- elsif markup?(@blob.name)
2014-04-15 11:02:02 -04:00
.file-content.wiki
= raw render_markup(@blob.name, @content)
2014-04-15 11:02:02 -04:00
- else
.file-content.code
- unless @diff.empty?
%table.text-file
- @diff.each do |line, type, line_code, line_new, line_old, raw_line|
%tr.line_holder{ id: line_code, class: "#{type}" }
- if type == "match"
%td.old_line= "..."
%td.new_line= "..."
%td.line_content.matched= line
- else
%td.old_line
= link_to raw(type == "new" ? " " : line_old), "##{line_code}", id: line_code
%td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", id: line_code
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line)
- else
.nothing-here-block No changes.