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

Added the correct hierarchy of controllers for the administrative part

parent 29847168
# 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!
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)
class Admin::GroupsController < AdminController
class Admin::GroupsController < Admin::ApplicationController
before_filter :group, only: [:edit, :show, :update, :destroy, :project_update, :project_teams_update]
def index
class Admin::HooksController < AdminController
class Admin::HooksController < Admin::ApplicationController
def index
@hooks = SystemHook.all
@hook =
class Admin::LogsController < AdminController
class Admin::LogsController < Admin::ApplicationController
class Admin::ProjectsController < AdminController
class Admin::ProjectsController < Admin::ApplicationController
before_filter :project, only: [:edit, :show, :update, :destroy, :team_update]
def index
class Admin::ResqueController < AdminController
class Admin::ResqueController < Admin::ApplicationController
def show
class Admin::TeamMembersController < AdminController
class Admin::TeamMembersController < Admin::ApplicationController
def edit
@admin_team_member = UsersProject.find(params[:id])
class Admin::TeamsController < AdminController
class Admin::TeamsController < Admin::ApplicationController
before_filter :user_team,
only: [ :edit, :show, :update, :destroy,
:delegate_projects, :relegate_project,
class Admin::UsersController < AdminController
class Admin::UsersController < Admin::ApplicationController
def index
@admin_users = User.scoped
@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