Added the correct hierarchy of controllers for the administrative part
This commit is contained in:
parent
2984716870
commit
9d318db48f
|
@ -1,7 +1,7 @@
|
|||
# Provides a base class for Admin controllers to subclass
|
||||
#
|
||||
# Automatically sets the layout and ensures an administrator is logged in
|
||||
class AdminController < ApplicationController
|
||||
class Admin::ApplicationController < ApplicationController
|
||||
layout 'admin'
|
||||
before_filter :authenticate_admin!
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::DashboardController < AdminController
|
||||
class Admin::DashboardController < Admin::ApplicationController
|
||||
def index
|
||||
@projects = Project.order("created_at DESC").limit(10)
|
||||
@users = User.order("created_at DESC").limit(10)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::GroupsController < AdminController
|
||||
class Admin::GroupsController < Admin::ApplicationController
|
||||
before_filter :group, only: [:edit, :show, :update, :destroy, :project_update, :project_teams_update]
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::HooksController < AdminController
|
||||
class Admin::HooksController < Admin::ApplicationController
|
||||
def index
|
||||
@hooks = SystemHook.all
|
||||
@hook = SystemHook.new
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
class Admin::LogsController < AdminController
|
||||
class Admin::LogsController < Admin::ApplicationController
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::ProjectsController < AdminController
|
||||
class Admin::ProjectsController < Admin::ApplicationController
|
||||
before_filter :project, only: [:edit, :show, :update, :destroy, :team_update]
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::ResqueController < AdminController
|
||||
class Admin::ResqueController < Admin::ApplicationController
|
||||
def show
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::TeamMembersController < AdminController
|
||||
class Admin::TeamMembersController < Admin::ApplicationController
|
||||
def edit
|
||||
@admin_team_member = UsersProject.find(params[:id])
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::TeamsController < AdminController
|
||||
class Admin::TeamsController < Admin::ApplicationController
|
||||
before_filter :user_team,
|
||||
only: [ :edit, :show, :update, :destroy,
|
||||
:delegate_projects, :relegate_project,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin::UsersController < AdminController
|
||||
class Admin::UsersController < Admin::ApplicationController
|
||||
def index
|
||||
@admin_users = User.scoped
|
||||
@admin_users = @admin_users.filter(params[:filter])
|
||||
|
|
Loading…
Reference in a new issue