diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 59d117e..68377b6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -26,6 +26,7 @@ class ApplicationController < ActionController::Base before_filter :user_setup, :check_if_login_required, :set_localization filter_parameter_logging :password + include Redmine::Search::Controller include Redmine::MenuManager::MenuController helper Redmine::MenuManager::MenuHelper diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index eaac14e..436398d 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class BoardsController < ApplicationController + default_search_scope :messages before_filter :find_project, :authorize helper :messages diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index c2e0876..c9eecf4 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class DocumentsController < ApplicationController + default_search_scope :documents before_filter :find_project, :only => [:index, :new] before_filter :find_document, :except => [:index, :new] before_filter :authorize diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 74fe25d..bebba10 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -17,6 +17,7 @@ class IssuesController < ApplicationController menu_item :new_issue, :only => :new + default_search_scope :issues before_filter :find_issue, :only => [:show, :edit, :reply] before_filter :find_issues, :only => [:bulk_edit, :move, :destroy] diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index f328e9b..8860973 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -17,6 +17,7 @@ class MessagesController < ApplicationController menu_item :boards + default_search_scope :messages before_filter :find_board, :only => [:new, :preview] before_filter :find_message, :except => [:new, :preview] before_filter :authorize, :except => [:preview, :edit, :destroy] diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index a8ad716..68d2b2a 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class NewsController < ApplicationController + default_search_scope :news before_filter :find_news, :except => [:new, :index, :preview] before_filter :find_project, :only => [:new, :preview] before_filter :authorize, :except => [:index, :preview] diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 7527f0d..8e39d42 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -24,6 +24,8 @@ class InvalidRevisionParam < Exception; end class RepositoriesController < ApplicationController menu_item :repository + default_search_scope :changesets + before_filter :find_repository, :except => :edit before_filter :find_project, :only => :edit before_filter :authorize diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index b000b05..63382f8 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -18,6 +18,7 @@ require 'diff' class WikiController < ApplicationController + default_search_scope :wiki_pages before_filter :find_wiki, :authorize before_filter :find_existing_page, :only => [:rename, :protect, :history, :diff, :annotate, :add_attachment, :destroy] diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 471953a..d8fdcf0 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -31,6 +31,7 @@