@@ -49,7 +49,8 module RepositoriesHelper | |||
|
49 | 49 | when 'A' |
|
50 | 50 | # Detects moved/copied files |
|
51 | 51 | if !change.from_path.blank? |
|
52 | change.action = @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C' | |
|
52 | change.action = | |
|
53 | @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C' | |
|
53 | 54 | end |
|
54 | 55 | change |
|
55 | 56 | when 'D' |
@@ -57,7 +58,7 module RepositoriesHelper | |||
|
57 | 58 | else |
|
58 | 59 | change |
|
59 | 60 | end |
|
60 | end.compact | |
|
61 | end.compact | |
|
61 | 62 | |
|
62 | 63 | tree = { } |
|
63 | 64 | changes.each do |change| |
@@ -73,13 +74,11 module RepositoriesHelper | |||
|
73 | 74 | end |
|
74 | 75 | p[:c] = change |
|
75 | 76 | end |
|
76 | ||
|
77 | 77 | render_changes_tree(tree[:s]) |
|
78 | 78 | end |
|
79 | 79 | |
|
80 | 80 | def render_changes_tree(tree) |
|
81 | 81 | return '' if tree.nil? |
|
82 | ||
|
83 | 82 | output = '' |
|
84 | 83 | output << '<ul>' |
|
85 | 84 | tree.keys.sort.each do |file| |
General Comments 0
You need to be logged in to leave comments.
Login now