From e08d947e77fa79b723bb1a32794f99d3c39ee463 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 25 Mar 2015 10:03:55 +0100 Subject: Use relative URL for Markdown references, except in mails. --- app/models/project_services/gitlab_issue_tracker_service.rb | 12 ++++++++++++ app/models/project_services/issue_tracker_service.rb | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'app/models') diff --git a/app/models/project_services/gitlab_issue_tracker_service.rb b/app/models/project_services/gitlab_issue_tracker_service.rb index 4ff9f75fcc9..5f0553f3b0b 100644 --- a/app/models/project_services/gitlab_issue_tracker_service.rb +++ b/app/models/project_services/gitlab_issue_tracker_service.rb @@ -47,4 +47,16 @@ class GitlabIssueTrackerService < IssueTrackerService def issue_url(iid) namespace_project_issue_url(namespace_id: project.namespace, project_id: project, id: iid) end + + def project_path + namespace_project_issues_path(project.namespace, project) + end + + def new_issue_path + new_namespace_project_issue_path(namespace_id: project.namespace, project_id: project) + end + + def issue_path(iid) + namespace_project_issue_path(namespace_id: project.namespace, project_id: project, id: iid) + end end diff --git a/app/models/project_services/issue_tracker_service.rb b/app/models/project_services/issue_tracker_service.rb index 8e90c44d103..c8ab9d63b74 100644 --- a/app/models/project_services/issue_tracker_service.rb +++ b/app/models/project_services/issue_tracker_service.rb @@ -34,6 +34,18 @@ class IssueTrackerService < Service self.issues_url.gsub(':id', iid.to_s) end + def project_path + project_url + end + + def new_issue_path + new_issue_url + end + + def issue_path(iid) + issue_url(iid) + end + def fields [ { type: 'text', name: 'description', placeholder: description }, -- cgit v1.2.1