code format clean up ApplicationHelper#parse_redmine_links
git-svn-id: http://svn.redmine.org/redmine/trunk@12809 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f44c32557c
commit
fb54d4e459
|
@ -750,10 +750,16 @@ module ApplicationHelper
|
||||||
repository = project.repository
|
repository = project.repository
|
||||||
end
|
end
|
||||||
# project.changesets.visible raises an SQL error because of a double join on repositories
|
# project.changesets.visible raises an SQL error because of a double join on repositories
|
||||||
if repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(repository.id, identifier))
|
if repository &&
|
||||||
link = link_to(h("#{project_prefix}#{repo_prefix}r#{identifier}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.revision},
|
(changeset = Changeset.visible.
|
||||||
:class => 'changeset',
|
find_by_repository_id_and_revision(repository.id, identifier))
|
||||||
:title => truncate_single_line(changeset.comments, :length => 100))
|
link = link_to(h("#{project_prefix}#{repo_prefix}r#{identifier}"),
|
||||||
|
{:only_path => only_path, :controller => 'repositories',
|
||||||
|
:action => 'revision', :id => project,
|
||||||
|
:repository_id => repository.identifier_param,
|
||||||
|
:rev => changeset.revision},
|
||||||
|
:class => 'changeset',
|
||||||
|
:title => truncate_single_line(changeset.comments, :length => 100))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif sep == '#'
|
elsif sep == '#'
|
||||||
|
@ -763,9 +769,11 @@ module ApplicationHelper
|
||||||
if oid.to_s == identifier &&
|
if oid.to_s == identifier &&
|
||||||
issue = Issue.visible.includes(:status).find_by_id(oid)
|
issue = Issue.visible.includes(:status).find_by_id(oid)
|
||||||
anchor = comment_id ? "note-#{comment_id}" : nil
|
anchor = comment_id ? "note-#{comment_id}" : nil
|
||||||
link = link_to(h("##{oid}#{comment_suffix}"), {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor},
|
link = link_to(h("##{oid}#{comment_suffix}"),
|
||||||
:class => issue.css_classes,
|
{:only_path => only_path, :controller => 'issues',
|
||||||
:title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
|
:action => 'show', :id => oid, :anchor => anchor},
|
||||||
|
:class => issue.css_classes,
|
||||||
|
:title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
|
||||||
end
|
end
|
||||||
when 'document'
|
when 'document'
|
||||||
if document = Document.visible.find_by_id(oid)
|
if document = Document.visible.find_by_id(oid)
|
||||||
|
|
Loading…
Reference in New Issue