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