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