Commit 2ed7cbfb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Move projects controllers/views in Projects module

parent 135356d3a095
......@@ -18,19 +18,19 @@ class Dispatcher
path = page.split(':')
switch page
when 'issues:index'
when 'projects:issues:index'
Issues.init()
when 'dashboard:show'
new Dashboard()
when 'commit:show'
when 'projects:commit:show'
new Commit()
when 'groups:show', 'teams:show', 'projects:show'
when 'groups:show', 'projects:show'
Pager.init(20, true)
when 'projects:new', 'projects:edit'
new Project()
when 'walls:show'
when 'projects:walls:show'
new Wall(project_id)
when 'teams:members:index'
when 'projects:teams:members:index'
new TeamMembers()
when 'groups:people'
new GroupMembers()
......
class ProjectResourceController < ApplicationController
before_filter :project
before_filter :repository
end
class Projects::ApplicationController < ApplicationController
before_filter :project
before_filter :repository
layout 'projects'
end
# Controller for viewing a file's blame
class BlameController < ProjectResourceController
class Projects::BlameController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
# Controller for viewing a file's blame
class BlobController < ProjectResourceController
class Projects::BlobController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
# Controller for a specific Commit
#
# Not to be confused with CommitsController, plural.
class CommitController < ProjectResourceController
class Projects::CommitController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
require "base64"
class CommitsController < ProjectResourceController
class Projects::CommitsController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class CompareController < ProjectResourceController
class Projects::CompareController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
class DeployKeysController < ProjectResourceController
class Projects::DeployKeysController < Projects::ApplicationController
respond_to :html
# Authorize
......
# Controller for edit a repository's file
class EditTreeController < ProjectResourceController
class Projects::EditTreeController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class GraphsController < ProjectResourceController
class Projects::GraphsController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
class HooksController < ProjectResourceController
class Projects::HooksController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_admin_project!, only: [:new, :create, :destroy]
......
class IssuesController < ProjectResourceController
class Projects::IssuesController < Projects::ApplicationController
before_filter :module_enabled
before_filter :issue, only: [:edit, :update, :show]
......
class LabelsController < ProjectResourceController
class Projects::LabelsController < Projects::ApplicationController
before_filter :module_enabled
# Allow read any issue
......
require 'gitlab/satellite/satellite'
class MergeRequestsController < ProjectResourceController
class Projects::MergeRequestsController < Projects::ApplicationController
before_filter :module_enabled
before_filter :merge_request, only: [:edit, :update, :show, :commits, :diffs, :automerge, :automerge_check, :ci_status]
before_filter :validates_merge_request, only: [:show, :diffs]
......
class MilestonesController < ProjectResourceController
class Projects::MilestonesController < Projects::ApplicationController
before_filter :module_enabled
before_filter :milestone, only: [:edit, :update, :destroy, :show]
......
class NetworkController < ProjectResourceController
class Projects::NetworkController < Projects::ApplicationController
include ExtractsPath
include ApplicationHelper
......
class NotesController < ProjectResourceController
class Projects::NotesController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_note!
before_filter :authorize_write_note!, only: [:create]
......
class ProtectedBranchesController < ProjectResourceController
class Projects::ProtectedBranchesController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :require_non_empty_project
......
# Controller for viewing a file's raw
class RawController < ProjectResourceController
class Projects::RawController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
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