code layout clean up application helper "link_to_revision" method

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8033 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-12-03 06:14:19 +00:00
parent 655dc18d71
commit 3eb534818a
1 changed files with 5 additions and 3 deletions

View File

@ -109,9 +109,11 @@ module ApplicationHelper
def link_to_revision(revision, project, options={})
text = options.delete(:text) || format_revision(revision)
rev = revision.respond_to?(:identifier) ? revision.identifier : revision
link_to(h(text), {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev},
:title => l(:label_revision_id, format_revision(revision)))
link_to(
h(text),
{:controller => 'repositories', :action => 'revision', :id => project, :rev => rev},
:title => l(:label_revision_id, format_revision(revision))
)
end
# Generates a link to a message