@@ -750,10 +750,16 module ApplicationHelper | |||||
750 | repository = project.repository |
|
750 | repository = project.repository | |
751 | end |
|
751 | end | |
752 | # project.changesets.visible raises an SQL error because of a double join on repositories |
|
752 | # project.changesets.visible raises an SQL error because of a double join on repositories | |
753 | if repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(repository.id, identifier)) |
|
753 | if repository && | |
754 | 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}, |
|
754 | (changeset = Changeset.visible. | |
755 | :class => 'changeset', |
|
755 | find_by_repository_id_and_revision(repository.id, identifier)) | |
756 | :title => truncate_single_line(changeset.comments, :length => 100)) |
|
756 | link = link_to(h("#{project_prefix}#{repo_prefix}r#{identifier}"), | |
|
757 | {:only_path => only_path, :controller => 'repositories', | |||
|
758 | :action => 'revision', :id => project, | |||
|
759 | :repository_id => repository.identifier_param, | |||
|
760 | :rev => changeset.revision}, | |||
|
761 | :class => 'changeset', | |||
|
762 | :title => truncate_single_line(changeset.comments, :length => 100)) | |||
757 | end |
|
763 | end | |
758 | end |
|
764 | end | |
759 | elsif sep == '#' |
|
765 | elsif sep == '#' | |
@@ -763,9 +769,11 module ApplicationHelper | |||||
763 | if oid.to_s == identifier && |
|
769 | if oid.to_s == identifier && | |
764 | issue = Issue.visible.includes(:status).find_by_id(oid) |
|
770 | issue = Issue.visible.includes(:status).find_by_id(oid) | |
765 | anchor = comment_id ? "note-#{comment_id}" : nil |
|
771 | anchor = comment_id ? "note-#{comment_id}" : nil | |
766 | link = link_to(h("##{oid}#{comment_suffix}"), {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor}, |
|
772 | link = link_to(h("##{oid}#{comment_suffix}"), | |
767 | :class => issue.css_classes, |
|
773 | {:only_path => only_path, :controller => 'issues', | |
768 | :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") |
|
774 | :action => 'show', :id => oid, :anchor => anchor}, | |
|
775 | :class => issue.css_classes, | |||
|
776 | :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") | |||
769 | end |
|
777 | end | |
770 | when 'document' |
|
778 | when 'document' | |
771 | if document = Document.visible.find_by_id(oid) |
|
779 | if document = Document.visible.find_by_id(oid) |
General Comments 0
You need to be logged in to leave comments.
Login now