@@ -793,21 +793,18 module ApplicationHelper | |||
|
793 | 793 | if oid.to_s == identifier && |
|
794 | 794 | issue = Issue.visible.find_by_id(oid) |
|
795 | 795 | anchor = comment_id ? "note-#{comment_id}" : nil |
|
796 |
link = link_to |
|
|
797 |
|
|
|
798 | :action => 'show', :id => oid, :anchor => anchor}, | |
|
796 | link = link_to("##{oid}#{comment_suffix}", | |
|
797 | issue_path(issue, :only_path => only_path, :anchor => anchor), | |
|
799 | 798 | :class => issue.css_classes, |
|
800 | 799 | :title => "#{issue.subject.truncate(100)} (#{issue.status.name})") |
|
801 | 800 | end |
|
802 | 801 | when 'document' |
|
803 | 802 | if document = Document.visible.find_by_id(oid) |
|
804 |
link = link_to |
|
|
805 | :class => 'document' | |
|
803 | link = link_to(document.title, document_path(document, :only_path => only_path), :class => 'document') | |
|
806 | 804 | end |
|
807 | 805 | when 'version' |
|
808 | 806 | if version = Version.visible.find_by_id(oid) |
|
809 |
link = link_to |
|
|
810 | :class => 'version' | |
|
807 | link = link_to(version.name, version_path(version, :only_path => only_path), :class => 'version') | |
|
811 | 808 | end |
|
812 | 809 | when 'message' |
|
813 | 810 | if message = Message.visible.find_by_id(oid) |
@@ -815,13 +812,11 module ApplicationHelper | |||
|
815 | 812 | end |
|
816 | 813 | when 'forum' |
|
817 | 814 | if board = Board.visible.find_by_id(oid) |
|
818 | link = link_to h(board.name), {:only_path => only_path, :controller => 'boards', :action => 'show', :id => board, :project_id => board.project}, | |
|
819 | :class => 'board' | |
|
815 | link = link_to(board.name, project_board_path(board.project, board, :only_path => only_path), :class => 'board') | |
|
820 | 816 | end |
|
821 | 817 | when 'news' |
|
822 | 818 | if news = News.visible.find_by_id(oid) |
|
823 |
link = link_to |
|
|
824 | :class => 'news' | |
|
819 | link = link_to(news.title, news_path(news, :only_path => only_path), :class => 'news') | |
|
825 | 820 | end |
|
826 | 821 | when 'project' |
|
827 | 822 | if p = Project.visible.find_by_id(oid) |
@@ -835,23 +830,19 module ApplicationHelper | |||
|
835 | 830 | case prefix |
|
836 | 831 | when 'document' |
|
837 | 832 | if project && document = project.documents.visible.find_by_title(name) |
|
838 |
link = link_to |
|
|
839 | :class => 'document' | |
|
833 | link = link_to(document.title, document_path(document, :only_path => only_path), :class => 'document') | |
|
840 | 834 | end |
|
841 | 835 | when 'version' |
|
842 | 836 | if project && version = project.versions.visible.find_by_name(name) |
|
843 |
link = link_to |
|
|
844 | :class => 'version' | |
|
837 | link = link_to(version.name, version_path(version, :only_path => only_path), :class => 'version') | |
|
845 | 838 | end |
|
846 | 839 | when 'forum' |
|
847 | 840 | if project && board = project.boards.visible.find_by_name(name) |
|
848 | link = link_to h(board.name), {:only_path => only_path, :controller => 'boards', :action => 'show', :id => board, :project_id => board.project}, | |
|
849 | :class => 'board' | |
|
841 | link = link_to(board.name, project_board_path(board.project, board, :only_path => only_path), :class => 'board') | |
|
850 | 842 | end |
|
851 | 843 | when 'news' |
|
852 | 844 | if project && news = project.news.visible.find_by_title(name) |
|
853 |
link = link_to |
|
|
854 | :class => 'news' | |
|
845 | link = link_to(news.title, news_path(news, :only_path => only_path), :class => 'news') | |
|
855 | 846 | end |
|
856 | 847 | when 'commit', 'source', 'export' |
|
857 | 848 | if project |
General Comments 0
You need to be logged in to leave comments.
Login now