routes.rb 1.48 KB
Newer Older
gitlabhq's avatar
gitlabhq committed
1
Gitlab::Application.routes.draw do
2 3 4 5

  get 'tags'=> 'tags#index'
  get 'tags/:tag' => 'projects#index'

Nihad Abbasov's avatar
Nihad Abbasov committed
6
  namespace :admin do
gitlabhq's avatar
gitlabhq committed
7 8 9 10 11 12 13 14 15 16
    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

Nihad Abbasov's avatar
Nihad Abbasov committed
17
  get "errors/gitosis"
gitlabhq's avatar
gitlabhq committed
18 19
  get "profile/password", :to => "profile#password"
  put "profile/password", :to => "profile#password_update"
20
  put "profile/edit", :to => "profile#social_update"
gitlabhq's avatar
gitlabhq committed
21
  get "profile", :to => "profile#show"
gitlabhq's avatar
gitlabhq committed
22
  get "dashboard", :to => "dashboard#index"
gitlabhq's avatar
gitlabhq committed
23 24 25 26
  #get "profile/:id", :to => "profile#show"

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

gitlabhq's avatar
gitlabhq committed
28 29
  devise_for :users

Nihad Abbasov's avatar
Nihad Abbasov committed
30 31
  resources :projects, :except => [:new, :create, :index], :path => "/" do
    member do
gitlabhq's avatar
gitlabhq committed
32 33 34 35
      get "tree"
      get "blob"
      get "team"
      get "wall"
Valery Sizov's avatar
Valery Sizov committed
36
      get "graph"
gitlabhq's avatar
gitlabhq committed
37 38 39 40 41

      # tree viewer
      get "tree/:commit_id" => "projects#tree"
      get "tree/:commit_id/:path" => "projects#tree",
      :as => :tree_file,
Nihad Abbasov's avatar
Nihad Abbasov committed
42
      :constraints => {
43
        :id => /[a-zA-Z0-9_\-]+/,
gitlabhq's avatar
gitlabhq committed
44 45 46 47 48
        :commit_id => /[a-zA-Z0-9]+/,
        :path => /.*/
      }

    end
gitlabhq's avatar
gitlabhq committed
49 50

    resources :snippets
gitlabhq's avatar
gitlabhq committed
51 52
    resources :commits
    resources :team_members
VSizov's avatar
VSizov committed
53 54
    resources :issues do
      collection do
55 56
        post  :sort
        get   :search
Adam Leonard's avatar
Adam Leonard committed
57
      end
VSizov's avatar
VSizov committed
58
    end
gitlabhq's avatar
gitlabhq committed
59 60
    resources :notes, :only => [:create, :destroy]
  end
gitlabhq's avatar
gitlabhq committed
61
  root :to => "dashboard#index"
gitlabhq's avatar
gitlabhq committed
62
end