kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.3 KiB
55 lines
1.3 KiB
18 years ago
|
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||
|
|
||
|
<%= stylesheet_link_tag "scm" %>
|
||
|
|
||
|
<table class="list">
|
||
|
<thead><tr><th>@<%= @rev %></th><th>@<%= @rev_to %></th><th></th></tr></thead>
|
||
|
<tbody>
|
||
|
<% parsing = false
|
||
|
line_num_l = 0
|
||
|
line_num_r = 0 %>
|
||
|
<% @diff.each do |line| %>
|
||
|
<%
|
||
|
if line =~ /^@@ (\+|\-)(\d+),\d+ (\+|\-)(\d+),\d+ @@/
|
||
|
line_num_l = $2.to_i
|
||
|
line_num_r = $4.to_i
|
||
|
if parsing %>
|
||
|
<tr class="spacing"><td colspan="3"> </td></tr>
|
||
|
<% end
|
||
|
parsing = true
|
||
|
next
|
||
|
end
|
||
|
next unless parsing
|
||
|
%>
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<% case line[0, 1]
|
||
|
when " " %>
|
||
|
<th class="line-num"><%= line_num_l %></th>
|
||
|
<th class="line-num"><%= line_num_r %></th>
|
||
|
<td class="line-code">
|
||
|
<% line_num_l = line_num_l + 1
|
||
|
line_num_r = line_num_r + 1
|
||
|
|
||
|
when "-" %>
|
||
|
<th class="line-num"></th>
|
||
|
<th class="line-num"><%= line_num_r %></th>
|
||
|
<td class="line-code" style="background: #fdd;">
|
||
|
<% line_num_r = line_num_r + 1
|
||
|
|
||
|
when "+" %>
|
||
|
<th class="line-num"><%= line_num_l %></th>
|
||
|
<th class="line-num"></th>
|
||
|
<td class="line-code" style="background: #dfd;">
|
||
|
<% line_num_l = line_num_l + 1
|
||
|
|
||
|
else
|
||
|
next
|
||
|
end %>
|
||
|
|
||
|
<%= h(line[1..-1]).gsub(/\s/, " ") %></td></tr>
|
||
|
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|