Skip to content
Snippets Groups Projects
routes.rb 1.47 KiB
Newer Older
  • Learn to ignore specific revisions
  • gitlabhq's avatar
    gitlabhq committed
    Gitlab::Application.routes.draw do
    
      get "tags/index"
      get "tags/autocomplete"
    
    
    Nihad Abbasov's avatar
    Nihad Abbasov committed
      namespace :admin do
    
    gitlabhq's avatar
    gitlabhq committed
        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
      get "errors/gitosis"
    
    gitlabhq's avatar
    gitlabhq committed
      get "profile/password", :to => "profile#password"
      put "profile/password", :to => "profile#password_update"
    
      put "profile/edit", :to => "profile#social_update"
    
    gitlabhq's avatar
    gitlabhq committed
      get "profile", :to => "profile#show"
    
    gitlabhq's avatar
    gitlabhq committed
      get "dashboard", :to => "dashboard#index"
    
    gitlabhq's avatar
    gitlabhq committed
      #get "profile/:id", :to => "profile#show"
    
      resources :projects, :only => [:new, :create, :index]
      resources :keys
      devise_for :users
    
    
    Nihad Abbasov's avatar
    Nihad Abbasov committed
      resources :projects, :except => [:new, :create, :index], :path => "/" do
        member do
    
    gitlabhq's avatar
    gitlabhq committed
          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,
    
    Nihad Abbasov's avatar
    Nihad Abbasov committed
          :constraints => {
    
            :id => /[a-zA-Z0-9_\-]+/,
    
    gitlabhq's avatar
    gitlabhq committed
            :commit_id => /[a-zA-Z0-9]+/,
            :path => /.*/
          }
    
        end
    
    gitlabhq's avatar
    gitlabhq committed
    
        resources :snippets
    
    gitlabhq's avatar
    gitlabhq committed
        resources :commits
        resources :team_members
    
    VSizov's avatar
    VSizov committed
        resources :issues do
          collection do
            post :sort
          end
    
          collection do
            get :search
          end
    
    VSizov's avatar
    VSizov committed
        end
    
    gitlabhq's avatar
    gitlabhq committed
        resources :notes, :only => [:create, :destroy]
      end
    
    gitlabhq's avatar
    gitlabhq committed
      root :to => "dashboard#index"
    
    gitlabhq's avatar
    gitlabhq committed
    end