2018-08-18 07:19:57 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-05-26 17:07:45 -04:00
|
|
|
module TimeboxesRoutingHelper
|
2017-08-03 07:50:06 -04:00
|
|
|
def milestone_path(milestone, *args)
|
2017-08-24 12:41:44 -04:00
|
|
|
if milestone.group_milestone?
|
2017-08-03 07:50:06 -04:00
|
|
|
group_milestone_path(milestone.group, milestone, *args)
|
2017-08-24 12:37:37 -04:00
|
|
|
elsif milestone.project_milestone?
|
2017-08-03 07:50:06 -04:00
|
|
|
project_milestone_path(milestone.project, milestone, *args)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def milestone_url(milestone, *args)
|
2017-08-24 12:41:44 -04:00
|
|
|
if milestone.group_milestone?
|
2017-08-03 07:50:06 -04:00
|
|
|
group_milestone_url(milestone.group, milestone, *args)
|
2017-08-24 12:37:37 -04:00
|
|
|
elsif milestone.project_milestone?
|
2017-08-03 07:50:06 -04:00
|
|
|
project_milestone_url(milestone.project, milestone, *args)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2020-05-26 17:07:45 -04:00
|
|
|
|
|
|
|
TimeboxesRoutingHelper.prepend_if_ee('EE::TimeboxesRoutingHelper')
|