summaryrefslogtreecommitdiff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-06-13 23:39:39 +0000
committerMike Greiling <mike@pixelcog.com>2019-06-13 23:39:39 +0000
commit14b0a4627211dd123afe1381da5fe093408836ee (patch)
tree57ff8b4ac89771fdf5f836bc83da407d396683fb /app/helpers/search_helper.rb
parentd8b361aff274e4b9c010a483add693af15b51371 (diff)
downloadgitlab-ce-14b0a4627211dd123afe1381da5fe093408836ee.tar.gz
Use scoped routes for labels and milestones
Update frontend code to use /-/ scope for milestones and labels routes Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 4594f5a31b9..dfa34ad7020 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -172,11 +172,17 @@ module SearchHelper
if @project.present?
opts[:data]['project-id'] = @project.id
opts[:data]['base-endpoint'] = project_path(@project)
+ opts[:data]['labels-endpoint'] = project_labels_path(@project)
+ opts[:data]['milestones-endpoint'] = project_milestones_path(@project)
elsif @group.present?
opts[:data]['group-id'] = @group.id
opts[:data]['base-endpoint'] = group_canonical_path(@group)
+ opts[:data]['labels-endpoint'] = group_labels_path(@group)
+ opts[:data]['milestones-endpoint'] = group_milestones_path(@group)
else
opts[:data]['base-endpoint'] = root_dashboard_path
+ opts[:data]['labels-endpoint'] = dashboard_labels_path
+ opts[:data]['milestones-endpoint'] = dashboard_milestones_path
end
opts