scm: code clean up RepositoriesHelper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5506 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3b22d12c9c
commit
8dcde8fc59
|
@ -49,7 +49,8 @@ module RepositoriesHelper
|
||||||
when 'A'
|
when 'A'
|
||||||
# Detects moved/copied files
|
# Detects moved/copied files
|
||||||
if !change.from_path.blank?
|
if !change.from_path.blank?
|
||||||
change.action = @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
|
change.action =
|
||||||
|
@changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
|
||||||
end
|
end
|
||||||
change
|
change
|
||||||
when 'D'
|
when 'D'
|
||||||
|
@ -73,13 +74,11 @@ module RepositoriesHelper
|
||||||
end
|
end
|
||||||
p[:c] = change
|
p[:c] = change
|
||||||
end
|
end
|
||||||
|
|
||||||
render_changes_tree(tree[:s])
|
render_changes_tree(tree[:s])
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_changes_tree(tree)
|
def render_changes_tree(tree)
|
||||||
return '' if tree.nil?
|
return '' if tree.nil?
|
||||||
|
|
||||||
output = ''
|
output = ''
|
||||||
output << '<ul>'
|
output << '<ul>'
|
||||||
tree.keys.sort.each do |file|
|
tree.keys.sort.each do |file|
|
||||||
|
|
Loading…
Reference in New Issue