Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-27 00:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-27 00:07:45 +0300
commitea335f33ff8c6870e641385a254c1f993bb04038 (patch)
tree2f2c7b69388e11c15864bbe5e9f052699c094319 /app/helpers/timeboxes_routing_helper.rb
parent6ee98e127334fd235f251c4a4a76a396f301ee77 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/timeboxes_routing_helper.rb')
-rw-r--r--app/helpers/timeboxes_routing_helper.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/helpers/timeboxes_routing_helper.rb b/app/helpers/timeboxes_routing_helper.rb
new file mode 100644
index 00000000000..6fb5a1a3185
--- /dev/null
+++ b/app/helpers/timeboxes_routing_helper.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+module TimeboxesRoutingHelper
+ def milestone_path(milestone, *args)
+ if milestone.group_milestone?
+ group_milestone_path(milestone.group, milestone, *args)
+ elsif milestone.project_milestone?
+ project_milestone_path(milestone.project, milestone, *args)
+ end
+ end
+
+ def milestone_url(milestone, *args)
+ if milestone.group_milestone?
+ group_milestone_url(milestone.group, milestone, *args)
+ elsif milestone.project_milestone?
+ project_milestone_url(milestone.project, milestone, *args)
+ end
+ end
+end
+
+TimeboxesRoutingHelper.prepend_if_ee('EE::TimeboxesRoutingHelper')