mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
Don't repeat revision on each line.
git-svn-id: http://svn.redmine.org/redmine/trunk@17398 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e53660b717
commit
f57cacb284
@ -20,17 +20,17 @@
|
||||
|
||||
<table class="filecontent annotate">
|
||||
<tbody>
|
||||
<% line_num = 1 %>
|
||||
<% line_num = 1; prev_version = nil %>
|
||||
<% @annotate.lines.each do |line| -%>
|
||||
<tr class="bloc-<%= colors[line[0]] %>">
|
||||
<th class="line-num"><%= line_num %></th>
|
||||
<td class="revision"><%= link_to line[0], :controller => 'wiki',
|
||||
:action => 'show', :project_id => @project,
|
||||
:id => @page.title, :version => line[0] %></td>
|
||||
<td class="author"><%= line[1] %></td>
|
||||
:id => @page.title, :version => line[0] unless prev_version == line[0] %></td>
|
||||
<td class="author"><%= line[1] unless prev_version == line[0] %></td>
|
||||
<td class="line-code"><pre><%= line[2] %></pre></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% line_num += 1; prev_version = line[0] %>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -702,11 +702,10 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
assert_select 'td', :text => /h1\. CookBook documentation v2/
|
||||
end
|
||||
|
||||
# Line 4
|
||||
assert_select 'table.annotate tr:nth-child(4)' do
|
||||
assert_select 'th.line-num', :text => '4'
|
||||
# Line 2
|
||||
assert_select 'table.annotate tr:nth-child(2)' do
|
||||
assert_select 'th.line-num', :text => '2'
|
||||
assert_select 'td.author', :text => /John Smith/
|
||||
assert_select 'td', :text => /Line from v1/
|
||||
end
|
||||
|
||||
# Line 5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user