Issues link from project page follows on remote bug tracker if it selected now

This commit is contained in:
Andrew8xx8 2013-02-19 17:06:40 +04:00
parent ab98db73a3
commit b6d0f2852d
3 changed files with 22 additions and 3 deletions

View file

@ -41,6 +41,18 @@ module IssuesHelper
@project.milestones.active.order("id desc").all
end
def url_for_project_issues
return "" if @project.nil?
if @project.used_default_issues_tracker?
project_issues_filter_path(@project)
else
url = Settings[:issues_tracker][@project.issues_tracker]["project_url"]
url.gsub(':project_id', @project.id.to_s)
.gsub(':issues_tracker_id', @project.issues_tracker_id.to_s)
end
end
def url_for_issue(issue_id)
return "" if @project.nil?