summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-08-07 19:22:41 +0000
committerRobert Speicher <robert@gitlab.com>2017-08-07 19:22:41 +0000
commit4e2b630df716174ea9b07319a0fd5eda7b60cf8e (patch)
treec3d1a509818b86bc8bbc96cb84bae8113cfe7868 /app/helpers
parentbc648ae5d225b3b76cc3105681e2f404a5918f85 (diff)
parentdf00ebded67e871dfab226db3ffadc3dd6807d79 (diff)
downloadgitlab-ce-4e2b630df716174ea9b07319a0fd5eda7b60cf8e.tar.gz
Merge branch 'group-milestone-references-system-notes' into 'master'
Support group milestone references Closes #34778 See merge request !13289
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/gitlab_routing_helper.rb16
-rw-r--r--app/helpers/milestones_routing_helper.rb17
2 files changed, 17 insertions, 16 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index 1f7db9b2eb8..d4a91e533c1 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -47,14 +47,6 @@ module GitlabRoutingHelper
project_pipeline_path(pipeline.project, pipeline.id, *args)
end
- def milestone_path(entity, *args)
- if entity.is_group_milestone?
- group_milestone_path(entity.group, entity, *args)
- elsif entity.is_project_milestone?
- project_milestone_path(entity.project, entity, *args)
- end
- end
-
def issue_url(entity, *args)
project_issue_url(entity.project, entity, *args)
end
@@ -67,14 +59,6 @@ module GitlabRoutingHelper
project_pipeline_url(pipeline.project, pipeline.id, *args)
end
- def milestone_url(entity, *args)
- if entity.is_group_milestone?
- group_milestone_url(entity.group, entity, *args)
- elsif entity.is_project_milestone?
- project_milestone_url(entity.project, entity, *args)
- end
- end
-
def pipeline_job_url(pipeline, build, *args)
project_job_url(pipeline.project, build.id, *args)
end
diff --git a/app/helpers/milestones_routing_helper.rb b/app/helpers/milestones_routing_helper.rb
new file mode 100644
index 00000000000..766d5262018
--- /dev/null
+++ b/app/helpers/milestones_routing_helper.rb
@@ -0,0 +1,17 @@
+module MilestonesRoutingHelper
+ def milestone_path(milestone, *args)
+ if milestone.is_group_milestone?
+ group_milestone_path(milestone.group, milestone, *args)
+ elsif milestone.is_project_milestone?
+ project_milestone_path(milestone.project, milestone, *args)
+ end
+ end
+
+ def milestone_url(milestone, *args)
+ if milestone.is_group_milestone?
+ group_milestone_url(milestone.group, milestone, *args)
+ elsif milestone.is_project_milestone?
+ project_milestone_url(milestone.project, milestone, *args)
+ end
+ end
+end