@@ -750,10 +750,16 module ApplicationHelper | |||
|
750 | 750 | repository = project.repository |
|
751 | 751 | end |
|
752 | 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)) | |
|
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}, | |
|
755 | :class => 'changeset', | |
|
756 | :title => truncate_single_line(changeset.comments, :length => 100)) | |
|
753 | if repository && | |
|
754 | (changeset = Changeset.visible. | |
|
755 | find_by_repository_id_and_revision(repository.id, identifier)) | |
|
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 | 763 | end |
|
758 | 764 | end |
|
759 | 765 | elsif sep == '#' |
@@ -763,9 +769,11 module ApplicationHelper | |||
|
763 | 769 | if oid.to_s == identifier && |
|
764 | 770 | issue = Issue.visible.includes(:status).find_by_id(oid) |
|
765 | 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}, | |
|
767 | :class => issue.css_classes, | |
|
768 | :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") | |
|
772 | link = link_to(h("##{oid}#{comment_suffix}"), | |
|
773 | {:only_path => only_path, :controller => 'issues', | |
|
774 | :action => 'show', :id => oid, :anchor => anchor}, | |
|
775 | :class => issue.css_classes, | |
|
776 | :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") | |
|
769 | 777 | end |
|
770 | 778 | when 'document' |
|
771 | 779 | if document = Document.visible.find_by_id(oid) |
General Comments 0
You need to be logged in to leave comments.
Login now