Defect #36580 » redmine-4.2.3-codelines-2022-02-06-20-12.diff
| app/views/common/_diff.html.erb (working copy) | ||
|---|---|---|
|
<% diff.each do |table_file| -%>
|
||
|
<div class="autoscroll">
|
||
|
<% if diff.diff_type == 'sbs' -%>
|
||
|
<table class="filecontent">
|
||
|
<table class="filecontent diffcontent">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th colspan="4" class="filename">
|
||
| ... | ... | |
|
<% table_file.each_line do |spacing, line| -%>
|
||
|
<% if spacing -%>
|
||
|
<tr class="spacing">
|
||
|
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
|
||
|
<th class="line-num" data-txt="..."></th><td></td><th class="line-num" data-txt="..."></th><td></td>
|
||
|
</tr>
|
||
|
<% end -%>
|
||
|
<tr>
|
||
|
<th class="line-num"><%= line.nb_line_left %></th>
|
||
|
<th class="line-num" data-txt="<%= line.nb_line_left %>"></th>
|
||
|
<td class="line-code <%= line.type_diff_left %>">
|
||
|
<pre><%= line.html_line_left.html_safe %></pre>
|
||
|
<div><%= line.html_line_left.html_safe %></div>
|
||
|
</td>
|
||
|
<th class="line-num"><%= line.nb_line_right %></th>
|
||
|
<th class="line-num" data-txt="<%= line.nb_line_right %>"></th>
|
||
|
<td class="line-code <%= line.type_diff_right %>">
|
||
|
<pre><%= line.html_line_right.html_safe %></pre>
|
||
|
<div><%= line.html_line_right.html_safe %></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end -%>
|
||
| ... | ... | |
|
</table>
|
||
|
<% else -%>
|
||
|
<table class="filecontent">
|
||
|
<table class="filecontent diffcontent">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th colspan="3" class="filename">
|
||
| ... | ... | |
|
</tr>
|
||
|
<% end -%>
|
||
|
<tr>
|
||
|
<th class="line-num"><%= line.nb_line_left %></th>
|
||
|
<th class="line-num"><%= line.nb_line_right %></th>
|
||
|
<th class="line-num" data-txt="<%= line.nb_line_left %>"></th>
|
||
|
<th class="line-num" data-txt="<%= line.nb_line_right %>"></th>
|
||
|
<td class="line-code <%= line.type_diff %>">
|
||
|
<pre><%= line.html_line.html_safe %></pre>
|
||
|
<div><%= line.html_line.html_safe %></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end -%>
|
||
| app/views/common/_file.html.erb (working copy) | ||
|---|---|---|
|
<% line_num = 1 %>
|
||
|
<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
|
||
|
<tr id="L<%= line_num %>">
|
||
|
<th class="line-num">
|
||
|
<a href="#L<%= line_num %>"><%= line_num %></a>
|
||
|
</th>
|
||
|
<th class="line-num"><a href="#L<%= line_num %>" data-txt="<%= line_num %>"></a></th>
|
||
|
<td class="line-code">
|
||
|
<pre><%= line.html_safe %></pre>
|
||
|
<% if line == "\n" or line == "\r\n" %>
|
||
|
<br>
|
||
|
<% else %>
|
||
|
<div><%= line.html_safe %></div>
|
||
|
<% end %>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% line_num += 1 %>
|
||
| app/views/repositories/annotate.html.erb (working copy) | ||
|---|---|---|
|
<% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %>
|
||
|
<% revision = @annotate.revisions[line_num - 1] %>
|
||
|
<tr id="L<%= line_num %>" class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %> <%= previous_revision && revision && revision != previous_revision ? 'bloc-change' : nil%>">
|
||
|
<th class="line-num"><a href="#L<%= line_num %>"><%= line_num %></a></th>
|
||
|
<th class="line-num"><a href="#L<%= line_num %>" data-txt="<%= line_num %>"></a></th>
|
||
|
<td class="revision">
|
||
|
<% if revision && revision != previous_revision %>
|
||
|
<%= revision.identifier ?
|
||
| ... | ... | |
|
<%= author.split('<').first %>
|
||
|
<% end %>
|
||
|
</td>
|
||
|
<td class="line-code"><pre><%= line.html_safe %></pre></td>
|
||
|
<% if line == "\n" or line == "\r\n" %>
|
||
|
<td class="line-code"><br></td>
|
||
|
<% else %>
|
||
|
<td class="line-code"><div><%= line.html_safe %></div></td>
|
||
|
<% end %>
|
||
|
</tr>
|
||
|
<% line_num += 1; previous_revision = revision %>
|
||
|
<% end %>
|
||
| public/stylesheets/scm.css (working copy) | ||
|---|---|---|
|
text-decoration: none;
|
||
|
color: inherit;
|
||
|
}
|
||
|
table.filecontent th.line-num a:after {
|
||
|
content: attr(data-txt);
|
||
|
}
|
||
|
table.diffcontent th.line-num:after {
|
||
|
content: attr(data-txt);
|
||
|
}
|
||
|
table.filecontent td.line-code {padding: 0 0 0 4px;}
|
||
|
table.filecontent td.line-code pre {
|
||
|
table.filecontent td.line-code pre, table.filecontent td.line-code div {
|
||
|
margin: 0px;
|
||
|
white-space: pre-wrap;
|
||
|
font-family:Consolas, Menlo, "Liberation Mono", Courier, monospace; font-size:12px;
|
||