diff options
author | skv <skv-headless@yandex.ru> | 2014-08-02 19:12:01 +0400 |
---|---|---|
committer | skv <skv-headless@yandex.ru> | 2014-08-14 15:48:14 +0400 |
commit | 4e4080016604e2c7ca9a5e75d6dd37d34b99cb09 (patch) | |
tree | 1a443fc6b7a16828c8a4b92d1724c2f72a4024f4 /app/views/projects/blob/diff.html.haml | |
parent | fdd8e4507527badd875a40a0ab8a3ed47a03c764 (diff) |
diff unfold
Diffstat (limited to 'app/views/projects/blob/diff.html.haml')
-rw-r--r-- | app/views/projects/blob/diff.html.haml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/views/projects/blob/diff.html.haml b/app/views/projects/blob/diff.html.haml new file mode 100644 index 00000000000..cfb91d6568a --- /dev/null +++ b/app/views/projects/blob/diff.html.haml @@ -0,0 +1,19 @@ +- if @lines.present? + - if @form.unfold? && @form.since != 1 && !@form.bottom? + %tr.line_holder{ id: @form.since } + = render "projects/commits/diffs/match_line", {line: @match_line, + line_old: @form.since, line_new: @form.since, bottom: false} + + - @lines.each_with_index do |line, index| + - line_new = index + @form.since + - line_old = line_new - @form.offset + %tr.line_holder + %td.old_line.diff-line-num{data: {linenumber: line_old}} + = link_to raw(line_old), "#" + %td.new_line= link_to raw(line_new) , "#" + %td.line_content.noteable_line= line + + - if @form.unfold? && @form.bottom? && @form.to < @blob.loc + %tr.line_holder{ id: @form.to } + = render "projects/commits/diffs/match_line", {line: @match_line, + line_old: @form.to, line_new: @form.to, bottom: true} |