Avoid line_code and position calculation on line partial for plain view
This commit is contained in:
parent
2f344eca42
commit
44eec823fb
|
@ -32,6 +32,7 @@ v 8.11.0 (unreleased)
|
||||||
- Add the `sprockets-es6` gem
|
- Add the `sprockets-es6` gem
|
||||||
- Multiple trigger variables show in separate lines (Katarzyna Kobierska Ula Budziszewska)
|
- Multiple trigger variables show in separate lines (Katarzyna Kobierska Ula Budziszewska)
|
||||||
- Profile requests when a header is passed
|
- Profile requests when a header is passed
|
||||||
|
- Avoid calculation of line_code and position for _line partial when showing diff notes on discussion tab.
|
||||||
- Add commit stats in commit api. !5517 (dixpac)
|
- Add commit stats in commit api. !5517 (dixpac)
|
||||||
- Make error pages responsive (Takuya Noguchi)
|
- Make error pages responsive (Takuya Noguchi)
|
||||||
- Change requests_profiles resource constraint to catch virtually any file
|
- Change requests_profiles resource constraint to catch virtually any file
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
- plain = local_assigns.fetch(:plain, false)
|
- plain = local_assigns.fetch(:plain, false)
|
||||||
- line_code = diff_file.line_code(line)
|
|
||||||
- position = diff_file.position(line)
|
|
||||||
- type = line.type
|
- type = line.type
|
||||||
%tr.line_holder{ id: line_code, class: type }
|
- line_code = diff_file.line_code(line) unless plain
|
||||||
|
%tr.line_holder{ plain ? { class: type} : { class: type, id: line_code } }
|
||||||
- case type
|
- case type
|
||||||
- when 'match'
|
- when 'match'
|
||||||
= render "projects/diffs/match_line", { line: line.text,
|
= render "projects/diffs/match_line", { line: line.text,
|
||||||
|
@ -24,4 +23,4 @@
|
||||||
= link_text
|
= link_text
|
||||||
- else
|
- else
|
||||||
%a{href: "##{line_code}", data: { linenumber: link_text }}
|
%a{href: "##{line_code}", data: { linenumber: link_text }}
|
||||||
%td.line_content.noteable_line{ class: type, data: (diff_view_line_data(line_code, position, type) unless plain) }= diff_line_content(line.text, type)
|
%td.line_content.noteable_line{ class: type, data: (diff_view_line_data(line_code, diff_file.position(line), type) unless plain) }= diff_line_content(line.text, type)
|
||||||
|
|
Loading…
Reference in New Issue