diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 19:47:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 19:47:22 +0300 |
commit | 2ed7cbfba4ff3c6a4cf3e72515a0375544998de0 (patch) | |
tree | ae6d7530745c80633cd993c99f7820e1452f3e1b /app/controllers | |
parent | 95791316f4037273af7b747ce1851d5f4e46933f (diff) | |
download | gitlab-ce-2ed7cbfba4ff3c6a4cf3e72515a0375544998de0.tar.gz |
Move projects controllers/views in Projects module
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/project_resource_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/projects/application_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/projects/blame_controller.rb (renamed from app/controllers/blame_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/blob_controller.rb (renamed from app/controllers/blob_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/commit_controller.rb (renamed from app/controllers/commit_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/commits_controller.rb (renamed from app/controllers/commits_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/compare_controller.rb (renamed from app/controllers/compare_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/deploy_keys_controller.rb (renamed from app/controllers/deploy_keys_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/edit_tree_controller.rb (renamed from app/controllers/edit_tree_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/graphs_controller.rb (renamed from app/controllers/graphs_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/hooks_controller.rb (renamed from app/controllers/hooks_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/issues_controller.rb (renamed from app/controllers/issues_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/labels_controller.rb (renamed from app/controllers/labels_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb (renamed from app/controllers/merge_requests_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/milestones_controller.rb (renamed from app/controllers/milestones_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/network_controller.rb (renamed from app/controllers/network_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/notes_controller.rb (renamed from app/controllers/notes_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/protected_branches_controller.rb (renamed from app/controllers/protected_branches_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/raw_controller.rb (renamed from app/controllers/raw_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/refs_controller.rb (renamed from app/controllers/refs_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/repositories_controller.rb (renamed from app/controllers/repositories_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/services_controller.rb (renamed from app/controllers/services_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/snippets_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/team_members_controller.rb (renamed from app/controllers/team_members_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/tree_controller.rb (renamed from app/controllers/tree_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/walls_controller.rb (renamed from app/controllers/walls_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects/wikis_controller.rb (renamed from app/controllers/wikis_controller.rb) | 2 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
28 files changed, 27 insertions, 30 deletions
diff --git a/app/controllers/project_resource_controller.rb b/app/controllers/project_resource_controller.rb deleted file mode 100644 index ea78b3ff7c4..00000000000 --- a/app/controllers/project_resource_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ProjectResourceController < ApplicationController - before_filter :project - before_filter :repository -end diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index 86e4a7cbd6b..1f2a75175cf 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -1,4 +1,5 @@ class Projects::ApplicationController < ApplicationController before_filter :project before_filter :repository + layout 'projects' end diff --git a/app/controllers/blame_controller.rb b/app/controllers/projects/blame_controller.rb index c950af56e26..e58b4507202 100644 --- a/app/controllers/blame_controller.rb +++ b/app/controllers/projects/blame_controller.rb @@ -1,5 +1,5 @@ # Controller for viewing a file's blame -class BlameController < ProjectResourceController +class Projects::BlameController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 3547dfe2323..b1329c01ce7 100644 --- a/app/controllers/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -1,5 +1,5 @@ # Controller for viewing a file's blame -class BlobController < ProjectResourceController +class Projects::BlobController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/commit_controller.rb b/app/controllers/projects/commit_controller.rb index a164de33107..6a2d2315c1d 100644 --- a/app/controllers/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -1,7 +1,7 @@ # 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! diff --git a/app/controllers/commits_controller.rb b/app/controllers/projects/commits_controller.rb index cde1f459d76..bdffc940ea5 100644 --- a/app/controllers/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -1,6 +1,6 @@ require "base64" -class CommitsController < ProjectResourceController +class Projects::CommitsController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 750e9c2380e..126a2ea50c9 100644 --- a/app/controllers/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -1,4 +1,4 @@ -class CompareController < ProjectResourceController +class Projects::CompareController < Projects::ApplicationController # Authorize before_filter :authorize_read_project! before_filter :authorize_code_access! diff --git a/app/controllers/deploy_keys_controller.rb b/app/controllers/projects/deploy_keys_controller.rb index 4bd810f20c0..0750e0a146f 100644 --- a/app/controllers/deploy_keys_controller.rb +++ b/app/controllers/projects/deploy_keys_controller.rb @@ -1,4 +1,4 @@ -class DeployKeysController < ProjectResourceController +class Projects::DeployKeysController < Projects::ApplicationController respond_to :html # Authorize diff --git a/app/controllers/edit_tree_controller.rb b/app/controllers/projects/edit_tree_controller.rb index 9ed7a2143e4..11c97291296 100644 --- a/app/controllers/edit_tree_controller.rb +++ b/app/controllers/projects/edit_tree_controller.rb @@ -1,5 +1,5 @@ # Controller for edit a repository's file -class EditTreeController < ProjectResourceController +class Projects::EditTreeController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb index 6c2ac5fcbf4..5ff330ba6ca 100644 --- a/app/controllers/graphs_controller.rb +++ b/app/controllers/projects/graphs_controller.rb @@ -1,4 +1,4 @@ -class GraphsController < ProjectResourceController +class Projects::GraphsController < Projects::ApplicationController # Authorize before_filter :authorize_read_project! before_filter :authorize_code_access! diff --git a/app/controllers/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index feaa16b6875..3367ddb5d14 100644 --- a/app/controllers/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -1,4 +1,4 @@ -class HooksController < ProjectResourceController +class Projects::HooksController < Projects::ApplicationController # Authorize before_filter :authorize_read_project! before_filter :authorize_admin_project!, only: [:new, :create, :destroy] diff --git a/app/controllers/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 65e72792924..06f8a1233a3 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -1,4 +1,4 @@ -class IssuesController < ProjectResourceController +class Projects::IssuesController < Projects::ApplicationController before_filter :module_enabled before_filter :issue, only: [:edit, :update, :show] diff --git a/app/controllers/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 0e78cecf4d1..65f9e2b9d57 100644 --- a/app/controllers/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -1,4 +1,4 @@ -class LabelsController < ProjectResourceController +class Projects::LabelsController < Projects::ApplicationController before_filter :module_enabled # Allow read any issue diff --git a/app/controllers/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 8d19e1b8b0b..0aa8bc8a6df 100644 --- a/app/controllers/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -1,6 +1,6 @@ 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] diff --git a/app/controllers/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb index 25647f97576..f4ee7427d29 100644 --- a/app/controllers/milestones_controller.rb +++ b/app/controllers/projects/milestones_controller.rb @@ -1,4 +1,4 @@ -class MilestonesController < ProjectResourceController +class Projects::MilestonesController < Projects::ApplicationController before_filter :module_enabled before_filter :milestone, only: [:edit, :update, :destroy, :show] diff --git a/app/controllers/network_controller.rb b/app/controllers/projects/network_controller.rb index 3c8e747ba4e..e4a84f80787 100644 --- a/app/controllers/network_controller.rb +++ b/app/controllers/projects/network_controller.rb @@ -1,4 +1,4 @@ -class NetworkController < ProjectResourceController +class Projects::NetworkController < Projects::ApplicationController include ExtractsPath include ApplicationHelper diff --git a/app/controllers/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 15ca963f281..ef15e419dbe 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -1,4 +1,4 @@ -class NotesController < ProjectResourceController +class Projects::NotesController < Projects::ApplicationController # Authorize before_filter :authorize_read_note! before_filter :authorize_write_note!, only: [:create] diff --git a/app/controllers/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb index fd2734eff84..81531bb0ac0 100644 --- a/app/controllers/protected_branches_controller.rb +++ b/app/controllers/projects/protected_branches_controller.rb @@ -1,4 +1,4 @@ -class ProtectedBranchesController < ProjectResourceController +class Projects::ProtectedBranchesController < Projects::ApplicationController # Authorize before_filter :authorize_read_project! before_filter :require_non_empty_project diff --git a/app/controllers/raw_controller.rb b/app/controllers/projects/raw_controller.rb index 18b401fe611..0d35f373e9c 100644 --- a/app/controllers/raw_controller.rb +++ b/app/controllers/projects/raw_controller.rb @@ -1,5 +1,5 @@ # Controller for viewing a file's raw -class RawController < ProjectResourceController +class Projects::RawController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/refs_controller.rb b/app/controllers/projects/refs_controller.rb index cae9193a1da..e5c090e1f4d 100644 --- a/app/controllers/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -1,4 +1,4 @@ -class RefsController < ProjectResourceController +class Projects::RefsController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb index a7d393af82b..b65af029803 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/projects/repositories_controller.rb @@ -1,4 +1,4 @@ -class RepositoriesController < ProjectResourceController +class Projects::RepositoriesController < Projects::ApplicationController # Authorize before_filter :authorize_read_project! before_filter :authorize_code_access! diff --git a/app/controllers/services_controller.rb b/app/controllers/projects/services_controller.rb index 5710f553fa4..6db22186c14 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -1,4 +1,4 @@ -class ServicesController < ProjectResourceController +class Projects::ServicesController < Projects::ApplicationController # Authorize before_filter :authorize_admin_project! before_filter :service, only: [:edit, :update, :test] diff --git a/app/controllers/projects/snippets_controller.rb b/app/controllers/projects/snippets_controller.rb index 1165fa1c583..59063103ecb 100644 --- a/app/controllers/projects/snippets_controller.rb +++ b/app/controllers/projects/snippets_controller.rb @@ -14,7 +14,7 @@ class Projects::SnippetsController < Projects::ApplicationController # Allow destroy snippet before_filter :authorize_admin_project_snippet!, only: [:destroy] - layout 'project_resource' + layout 'projects' respond_to :html diff --git a/app/controllers/team_members_controller.rb b/app/controllers/projects/team_members_controller.rb index 5f2493137c1..07ad7d86153 100644 --- a/app/controllers/team_members_controller.rb +++ b/app/controllers/projects/team_members_controller.rb @@ -1,4 +1,4 @@ -class TeamMembersController < ProjectResourceController +class Projects::TeamMembersController < Projects::ApplicationController # Authorize before_filter :authorize_read_project! before_filter :authorize_admin_project!, except: [:index, :show] diff --git a/app/controllers/tree_controller.rb b/app/controllers/projects/tree_controller.rb index 24e1329f926..5d543f35665 100644 --- a/app/controllers/tree_controller.rb +++ b/app/controllers/projects/tree_controller.rb @@ -1,5 +1,5 @@ # Controller for viewing a repository's file structure -class TreeController < ProjectResourceController +class Projects::TreeController < Projects::ApplicationController include ExtractsPath # Authorize diff --git a/app/controllers/walls_controller.rb b/app/controllers/projects/walls_controller.rb index 5993a5e2409..834215a1473 100644 --- a/app/controllers/walls_controller.rb +++ b/app/controllers/projects/walls_controller.rb @@ -1,4 +1,4 @@ -class WallsController < ProjectResourceController +class Projects::WallsController < Projects::ApplicationController before_filter :module_enabled respond_to :js, :html diff --git a/app/controllers/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb index be9ae4f37a4..797f3d3dd41 100644 --- a/app/controllers/wikis_controller.rb +++ b/app/controllers/projects/wikis_controller.rb @@ -1,4 +1,4 @@ -class WikisController < ProjectResourceController +class Projects::WikisController < Projects::ApplicationController before_filter :authorize_read_wiki! before_filter :authorize_write_wiki!, only: [:edit, :create, :history] before_filter :authorize_admin_wiki!, only: :destroy diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 858a638c7be..34b1d708ba7 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,4 +1,4 @@ -class ProjectsController < ProjectResourceController +class ProjectsController < Projects::ApplicationController skip_before_filter :project, only: [:new, :create] skip_before_filter :repository, only: [:new, :create] |