Slight changes to diff view and style.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1523 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-06-09 19:15:40 +00:00
parent efe790a8d3
commit 53b5703981
2 changed files with 9 additions and 4 deletions

View File

@ -9,7 +9,8 @@
<% prev_line_left, prev_line_right = nil, nil -%> <% prev_line_left, prev_line_right = nil, nil -%>
<% table_file.keys.sort.each do |key| -%> <% table_file.keys.sort.each do |key| -%>
<% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%> <% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%>
<tr class="spacing"><td colspan="4"></td></tr> <tr class="spacing">
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
<% end -%> <% end -%>
<tr> <tr>
<th class="line-num"><%= table_file[key].nb_line_left %></th> <th class="line-num"><%= table_file[key].nb_line_left %></th>
@ -35,7 +36,9 @@
<% prev_line_left, prev_line_right = nil, nil -%> <% prev_line_left, prev_line_right = nil, nil -%>
<% table_file.keys.sort.each do |key, line| %> <% table_file.keys.sort.each do |key, line| %>
<% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%> <% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%>
<tr class="spacing"><td colspan="3"></td></tr> <tr class="spacing">
<th class="line-num">...</th><th class="line-num">...</th><td></td>
</tr>
<% end -%> <% end -%>
<tr> <tr>
<th class="line-num"><%= table_file[key].nb_line_left %></th> <th class="line-num"><%= table_file[key].nb_line_left %></th>

View File

@ -1,14 +1,16 @@
table.filecontent { border: 1px solid #ccc; border-collapse: collapse; width:98%; } table.filecontent { border: 1px solid #ccc; border-collapse: collapse; width:98%; }
table.filecontent th { border: 1px solid #ccc; background-color: #eee; } table.filecontent th { border: 1px solid #ccc; background-color: #eee; }
table.filecontent th.filename { background-color: #ddc; text-align: left; } table.filecontent th.filename { background-color: #e4e4d4; text-align: left; padding: 0.2em;}
table.filecontent tr.spacing td { border: 1px solid #d7d7d7; height: 0.4em; } table.filecontent tr.spacing th { text-align:center; }
table.filecontent tr.spacing td { height: 0.4em; background: #EAF2F5;}
table.filecontent th.line-num { table.filecontent th.line-num {
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
font-size: 0.8em; font-size: 0.8em;
text-align: right; text-align: right;
width: 2%; width: 2%;
padding-right: 3px; padding-right: 3px;
color: #999;
} }
table.filecontent td.line-code pre { table.filecontent td.line-code pre {
white-space: pre-wrap; /* CSS2.1 compliant */ white-space: pre-wrap; /* CSS2.1 compliant */