Commit 9d318db4 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev Committed by Dmitriy Zaporozhets

Added the correct hierarchy of controllers for the administrative part

parent 29847168
# 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!
......
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)
......
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
......
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
......
class Admin::LogsController < AdminController class Admin::LogsController < Admin::ApplicationController
end end
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
......
class Admin::ResqueController < AdminController class Admin::ResqueController < Admin::ApplicationController
def show def show
end end
end end
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
......
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,
......
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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment