routes.rb 1.4 KB
Newer Older
G
gitlabhq 已提交
1
Gitlab::Application.routes.draw do
N
Nihad Abbasov 已提交
2
  namespace :admin do
G
gitlabhq 已提交
3 4 5 6 7 8 9 10 11 12
    resources :users
    resources :projects
    resources :team_members
    get 'emails', :to => 'mailer#preview'
    get 'mailer/preview_note'
    get 'mailer/preview_user_new'
    get 'mailer/preview_issue_new'
    root :to => "users#index"
  end

N
Nihad Abbasov 已提交
13
  get "errors/gitosis"
G
gitlabhq 已提交
14 15
  get "profile/password", :to => "profile#password"
  put "profile/password", :to => "profile#password_update"
16
  put "profile/edit", :to => "profile#social_update"
G
gitlabhq 已提交
17
  get "profile", :to => "profile#show"
G
gitlabhq 已提交
18
  get "dashboard", :to => "dashboard#index"
G
gitlabhq 已提交
19 20 21 22 23 24
  #get "profile/:id", :to => "profile#show"

  resources :projects, :only => [:new, :create, :index]
  resources :keys
  devise_for :users

N
Nihad Abbasov 已提交
25 26
  resources :projects, :except => [:new, :create, :index], :path => "/" do
    member do
G
gitlabhq 已提交
27 28 29 30 31 32 33 34 35
      get "tree"
      get "blob"
      get "team"
      get "wall"

      # tree viewer
      get "tree/:commit_id" => "projects#tree"
      get "tree/:commit_id/:path" => "projects#tree",
      :as => :tree_file,
N
Nihad Abbasov 已提交
36
      :constraints => {
G
gitlabhq 已提交
37
        :id => /[a-zA-Z0-9_\-]+/,
G
gitlabhq 已提交
38 39 40 41 42
        :commit_id => /[a-zA-Z0-9]+/,
        :path => /.*/
      }

    end
G
gitlabhq 已提交
43 44

    resources :snippets
G
gitlabhq 已提交
45 46
    resources :commits
    resources :team_members
V
VSizov 已提交
47 48 49 50
    resources :issues do
      collection do
        post :sort
      end
A
Adam Leonard 已提交
51 52 53
      collection do
        get :search
      end
V
VSizov 已提交
54
    end
G
gitlabhq 已提交
55 56
    resources :notes, :only => [:create, :destroy]
  end
G
gitlabhq 已提交
57
  root :to => "dashboard#index"
G
gitlabhq 已提交
58
end