Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
2 merge requests!2940Expanding repos and hooks paths in settings,!2746New feature: Teams
# 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!
 
Loading
Loading
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)
Loading
Loading
class Admin::GroupsController < AdminController
class Admin::GroupsController < Admin::ApplicationController
before_filter :group, only: [:edit, :show, :update, :destroy, :project_update, :project_teams_update]
 
def index
Loading
Loading
class Admin::HooksController < AdminController
class Admin::HooksController < Admin::ApplicationController
def index
@hooks = SystemHook.all
@hook = SystemHook.new
Loading
Loading
class Admin::LogsController < AdminController
class Admin::LogsController < Admin::ApplicationController
end
class Admin::ProjectsController < AdminController
class Admin::ProjectsController < Admin::ApplicationController
before_filter :project, only: [:edit, :show, :update, :destroy, :team_update]
 
def index
Loading
Loading
class Admin::ResqueController < AdminController
class Admin::ResqueController < Admin::ApplicationController
def show
end
end
class Admin::TeamMembersController < AdminController
class Admin::TeamMembersController < Admin::ApplicationController
def edit
@admin_team_member = UsersProject.find(params[:id])
end
Loading
Loading
class Admin::TeamsController < AdminController
class Admin::TeamsController < Admin::ApplicationController
before_filter :user_team,
only: [ :edit, :show, :update, :destroy,
:delegate_projects, :relegate_project,
Loading
Loading
class Admin::UsersController < AdminController
class Admin::UsersController < Admin::ApplicationController
def index
@admin_users = User.scoped
@admin_users = @admin_users.filter(params[:filter])
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment