Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove gon

Oliver Günther01139ce3313e
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index d1cd2431001..be4e04f7ee4 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -49,8 +49,6 @@ class SearchController < ApplicationController
end
end
- provision_gon
-
render "index", locals: { menu_name: project_or_global_menu }
end
@@ -169,20 +167,4 @@ class SearchController < ApplicationController
def scope_class(scope)
scope.singularize.camelcase.constantize
end
-
- def provision_gon
- available_search_types = search_types.dup.push("all")
-
- gon.global_search = {
- search_term: @question,
- project_scope: search_params[:scope].to_s,
- available_search_types: available_search_types.map do |search_type|
- {
- id: search_type,
- name: OpenProject::GlobalSearch.tab_name(search_type)
- }
- end,
- current_tab: available_search_types.detect { |search_type| search_params[search_type] } || "all"
- }
- end
end