##// END OF EJS Templates
patch #8937: Show filename above diff to aid reading multi-file diffs...
Jean-Philippe Lang -
r279:bb3a5bcfd7af
parent child
Show More
@@ -1,19 +1,25
1 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
1 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
2
2
3 <table class="list">
4 <thead><tr><th>@<%= @rev %></th><th>@<%= @rev_to %></th><th></th></tr></thead>
5 <tbody>
6 <% parsing = false
3 <% parsing = false
7 line_num_l = 0
4 line_num_l = 0
8 line_num_r = 0 %>
5 line_num_r = 0 %>
9 <% @diff.each do |line| %>
6 <% @diff.each do |line| %>
10 <%
7 <%
11 if line =~ /^@@ (\+|\-)(\d+)(,\d+)? (\+|\-)(\d+)(,\d+)? @@/
8 if line =~ /^Index: (.*)$/
9 if parsing %>
10 </tbody></table>
11 <%
12 end
13 parsing = false %>
14 <table class="list"><thead>
15 <tr><th colspan="3" class="list-filename"><%= l(:label_attachment) %>: <%= $1 %></th></tr>
16 <tr><th>@<%= @rev %></th><th>@<%= @rev_to %></th><th></th></tr>
17 </thead><tbody>
18 <%
19 next
20 elsif line =~ /^@@ (\+|\-)(\d+)(,\d+)? (\+|\-)(\d+)(,\d+)? @@/
12 line_num_l = $2.to_i
21 line_num_l = $2.to_i
13 line_num_r = $5.to_i
22 line_num_r = $5.to_i
14 if parsing %>
15 <tr class="spacing"><td colspan="3">&nbsp;</td></tr>
16 <% end
17 parsing = true
23 parsing = true
18 next
24 next
19 end
25 end
@@ -54,4 +60,4 line_num_r = 0 %>
54
60
55 <% content_for :header_tags do %>
61 <% content_for :header_tags do %>
56 <%= stylesheet_link_tag "scm" %>
62 <%= stylesheet_link_tag "scm" %>
57 <% end %> No newline at end of file
63 <% end %>
@@ -19,4 +19,10 tr.spacing {
19 .line-code {
19 .line-code {
20 font-family: "Courier New", monospace;
20 font-family: "Courier New", monospace;
21 font-size: 1em;
21 font-size: 1em;
22 } No newline at end of file
22 }
23
24 table.list thead th.list-filename {
25 background-color: #ddc;
26 font-weight: bolder;
27 text-align: left;
28 }
General Comments 0
You need to be logged in to leave comments. Login now