_text_file.html.haml 846 字节
Newer Older
D
Dmitriy Zaporozhets 已提交
1
- too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES
2
- if too_big
3 4
  .suppressed-container
    %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show.
5

6
%table.text-file.code.js-syntax-highlight{ class: too_big ? 'hide' : '' }
S
skv 已提交
7
  - last_line = 0
8
  - diff_file.highlighted_diff_lines.each do |line|
D
Douwe Maan 已提交
9
    - last_line = line.new_pos
10
    = render "projects/diffs/line", line: line, diff_file: diff_file
11

12
    - unless @diff_notes_disabled
13 14
      - line_code = diff_file.line_code(line)
      - diff_notes = @grouped_diff_notes[line_code] if line_code
D
Douwe Maan 已提交
15 16
      - if diff_notes
        = render "projects/notes/diff_notes_with_reply", notes: diff_notes
17

S
skv 已提交
18
  - if last_line > 0
19 20
    = render "projects/diffs/match_line", { line: "",
      line_old: last_line, line_new: last_line, bottom: true, new_file: diff_file.new_file }