diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 1fe990007..96a2fc921 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class AccountController < ApplicationController - layout 'base' helper :custom_fields include CustomFieldsHelper diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e002f3a27..a6df49dcd 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class AdminController < ApplicationController - layout 'base' before_filter :require_admin helper :sort diff --git a/app/controllers/application.rb b/app/controllers/application.rb index debe02162..7a56e61f0 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -18,6 +18,8 @@ require 'uri' class ApplicationController < ActionController::Base + layout 'base' + before_filter :user_setup, :check_if_login_required, :set_localization filter_parameter_logging :password diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 1e8f566e6..788bab94d 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class AttachmentsController < ApplicationController - layout 'base' before_filter :find_project def show diff --git a/app/controllers/auth_sources_controller.rb b/app/controllers/auth_sources_controller.rb index b830f1970..981f29f03 100644 --- a/app/controllers/auth_sources_controller.rb +++ b/app/controllers/auth_sources_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class AuthSourcesController < ApplicationController - layout 'base' before_filter :require_admin def index diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 5bf4499bd..4532a88fe 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class BoardsController < ApplicationController - layout 'base' before_filter :find_project, :authorize helper :messages diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index d30e89493..4589996f1 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class CustomFieldsController < ApplicationController - layout 'base' before_filter :require_admin def index diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 1f0784bb2..dbf9cd8e5 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class DocumentsController < ApplicationController - layout 'base' before_filter :find_project, :only => [:index, :new] before_filter :find_document, :except => [:index, :new] before_filter :authorize diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb index 788fa11b2..50521bab8 100644 --- a/app/controllers/enumerations_controller.rb +++ b/app/controllers/enumerations_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class EnumerationsController < ApplicationController - layout 'base' before_filter :require_admin def index diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index a73935b4f..8315d6eb8 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class IssueCategoriesController < ApplicationController - layout 'base' menu_item :settings before_filter :find_project, :authorize diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb index cb0ad552a..2ca3f0d68 100644 --- a/app/controllers/issue_relations_controller.rb +++ b/app/controllers/issue_relations_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class IssueRelationsController < ApplicationController - layout 'base' before_filter :find_project, :authorize def new diff --git a/app/controllers/issue_statuses_controller.rb b/app/controllers/issue_statuses_controller.rb index d0712e7c3..69d9db965 100644 --- a/app/controllers/issue_statuses_controller.rb +++ b/app/controllers/issue_statuses_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class IssueStatusesController < ApplicationController - layout 'base' before_filter :require_admin verify :method => :post, :only => [ :destroy, :create, :update, :move ], diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index c8edd1726..6e2de17c9 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class IssuesController < ApplicationController - layout 'base' menu_item :new_issue, :only => :new before_filter :find_issue, :only => [:show, :edit, :reply, :destroy_attachment] diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 758b8507f..6df54f098 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class JournalsController < ApplicationController - layout 'base' before_filter :find_journal def edit diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index a1706e601..1072090bc 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class MembersController < ApplicationController - layout 'base' before_filter :find_member, :except => :new before_filter :find_project, :only => :new before_filter :authorize diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 97cb2c3bf..08c77d7d2 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class MessagesController < ApplicationController - layout 'base' menu_item :boards before_filter :find_board, :only => [:new, :preview] before_filter :find_message, :except => [:new, :preview] diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index ff3393e90..1cfa3e531 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -16,11 +16,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class MyController < ApplicationController - helper :issues - - layout 'base' before_filter :require_login + helper :issues + BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues, 'issuesreportedbyme' => :label_reported_issues, 'issueswatched' => :label_watched_issues, diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 8c1a03a5b..b5f7ca1b2 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class NewsController < ApplicationController - layout 'base' 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/projects_controller.rb b/app/controllers/projects_controller.rb index cfac01b9a..43d35cf4f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class ProjectsController < ApplicationController - layout 'base' menu_item :overview menu_item :activity, :only => :activity menu_item :roadmap, :only => :roadmap diff --git a/app/controllers/queries_controller.rb b/app/controllers/queries_controller.rb index da2c4a2c8..8500e853a 100644 --- a/app/controllers/queries_controller.rb +++ b/app/controllers/queries_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class QueriesController < ApplicationController - layout 'base' menu_item :issues before_filter :find_query, :except => :new before_filter :find_optional_project, :only => :new diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 338059a50..dd3ece930 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class ReportsController < ApplicationController - layout 'base' menu_item :issues before_filter :find_project, :authorize diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 13bba6200..2f96e2d66 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -23,7 +23,6 @@ class ChangesetNotFound < Exception; end class InvalidRevisionParam < Exception; end class RepositoriesController < ApplicationController - layout 'base' menu_item :repository before_filter :find_repository, :except => :edit before_filter :find_project, :only => :edit diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 9fdd9701b..72555e5b0 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class RolesController < ApplicationController - layout 'base' before_filter :require_admin verify :method => :post, :only => [ :destroy, :move ], diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 50e42f088..e6e66f05c 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -16,8 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class SearchController < ApplicationController - layout 'base' - before_filter :find_optional_project helper :messages diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index e20cb64b5..6482a3576 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class SettingsController < ApplicationController - layout 'base' before_filter :require_admin def index diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index bf7b57d9d..f331cdbe4 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class TimelogController < ApplicationController - layout 'base' menu_item :issues before_filter :find_project, :authorize diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb index 3d7dbd5c5..8c02f9474 100644 --- a/app/controllers/trackers_controller.rb +++ b/app/controllers/trackers_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class TrackersController < ApplicationController - layout 'base' before_filter :require_admin def index diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index eb8aa7bac..d2564c2cb 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class UsersController < ApplicationController - layout 'base' before_filter :require_admin helper :sort diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 5d3393ed8..ab2ccb773 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class VersionsController < ApplicationController - layout 'base' menu_item :roadmap before_filter :find_project, :authorize diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index a44686d3f..8e6ee3a9e 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class WatchersController < ApplicationController - layout 'base' before_filter :find_project before_filter :require_login, :check_project_privacy, :only => [:watch, :unwatch] before_filter :authorize, :only => :new diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index b4be7fb1c..b8108e8ac 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class WelcomeController < ApplicationController - layout 'base' def index @news = News.latest User.current diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 5a5f3949f..46df2931e 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -18,7 +18,6 @@ require 'diff' class WikiController < ApplicationController - layout 'base' before_filter :find_wiki, :authorize verify :method => :post, :only => [:destroy, :destroy_attachment, :protect], :redirect_to => { :action => :index } diff --git a/app/controllers/wikis_controller.rb b/app/controllers/wikis_controller.rb index 6054abd9a..215d39f4b 100644 --- a/app/controllers/wikis_controller.rb +++ b/app/controllers/wikis_controller.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class WikisController < ApplicationController - layout 'base' menu_item :settings before_filter :find_project, :authorize