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