debian-mirror-gitlab/app/views/projects/blob/diff.html.haml

21 lines
953 B
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
- if @lines.present?
- if @form.unfold? && @form.since != 1 && !@form.bottom?
2016-06-02 11:05:42 +05:30
%tr.line_holder
= render "projects/diffs/match_line", { line: @match_line,
line_old: @form.since, line_new: @form.since, bottom: false, new_file: false }
2014-09-02 18:07:02 +05:30
- @lines.each_with_index do |line, index|
- line_new = index + @form.since
- line_old = line_new - @form.offset
2016-06-02 11:05:42 +05:30
%tr.line_holder{ id: line_old }
%td.old_line.diff-line-num{ data: { linenumber: line_old } }
= link_to raw(line_old), "##{line_old}"
%td.new_line.diff-line-num{ data: { linenumber: line_old } }
= link_to raw(line_new) , "##{line_old}"
2016-01-29 22:53:50 +05:30
%td.line_content.noteable_line==#{' ' * @form.indent}#{line}
2014-09-02 18:07:02 +05:30
- if @form.unfold? && @form.bottom? && @form.to < @blob.loc
%tr.line_holder{ id: @form.to }
2016-06-02 11:05:42 +05:30
= render "projects/diffs/match_line", { line: @match_line,
line_old: @form.to, line_new: @form.to, bottom: true, new_file: false }