From 191a77b2f7c280e00f7348507c13a173c704fcf9 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 29 Jun 2026 04:28:55 +0200 Subject: Restore and improve admin node search - Admin search broke when routing-filter was removed: hardcoded /admin/search and /admin/menu_search URLs in admin_search.js no longer matched the locale-scoped routes. Fix by emitting locale-aware URLs from the layout as JS variables. - Also fixes form submission (POST -> GET, missing = on form_tag), jQuery .attr("value") -> .val() for typeahead input reading, and template name for Rails 8 compatibility. - Adds a visible "search" link to the admin menu so editors can discover the feature without knowing the Alt+F shortcut. Search results now show node path alongside title and link directly to the edit view. Named route admin_menu_search added to routes.rb. --- config/routes.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index 92f2452..88f49a2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -54,6 +54,7 @@ Cccms::Application.routes.draw do match '/login' => 'sessions#new', :as => :login, :via => :get match 'admin' => 'admin#index', :as => :admin, :via => :get match 'admin/search' => 'admin#search', :as => :admin_search, :via => :get + match 'admin/menu_search' => 'admin#menu_search', :as => :admin_menu_search, :via => :get match 'search' => 'search#index', :as => :search, :via => :get resources :users -- cgit v1.3