diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-28 19:26:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-28 19:26:53 +0000 |
commit | bb3a5bcfd7af85322dcb76229058ca21b6e1c401 (patch) | |
tree | 101f81a8879b57e060b7399dc63531329a984105 /app/views/repositories | |
parent | 35678a1c090d577b7c92e3c3fc04ba17d3788645 (diff) | |
download | redmine-bb3a5bcfd7af85322dcb76229058ca21b6e1c401.tar.gz redmine-bb3a5bcfd7af85322dcb76229058ca21b6e1c401.zip |
patch #8937: Show filename above diff to aid reading multi-file diffs
git-svn-id: http://redmine.rubyforge.org/svn/trunk@282 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/repositories')
-rw-r--r-- | app/views/repositories/diff.rhtml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml index febac8ab1..776d920af 100644 --- a/app/views/repositories/diff.rhtml +++ b/app/views/repositories/diff.rhtml @@ -1,19 +1,25 @@ <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
-<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+)? @@/
+ if line =~ /^Index: (.*)$/
+ if parsing %>
+ </tbody></table>
+ <%
+ end
+ parsing = false %>
+ <table class="list"><thead>
+ <tr><th colspan="3" class="list-filename"><%= l(:label_attachment) %>: <%= $1 %></th></tr>
+ <tr><th>@<%= @rev %></th><th>@<%= @rev_to %></th><th></th></tr>
+ </thead><tbody>
+ <%
+ next
+ elsif line =~ /^@@ (\+|\-)(\d+)(,\d+)? (\+|\-)(\d+)(,\d+)? @@/
line_num_l = $2.to_i
line_num_r = $5.to_i
- if parsing %>
- <tr class="spacing"><td colspan="3"> </td></tr>
- <% end
parsing = true
next
end
@@ -54,4 +60,4 @@ line_num_r = 0 %> <% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
-<% end %>
\ No newline at end of file +<% end %>
|