CMSnb::Application.routes.draw do
  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"

  
  
  
  get 'nouvelles-pelerines.html' => "public/articles#index", :as => "public_articles"
  
  #post 'reposoir/sages-paroles/merci-de-votre-participation.html' => "public/quotes#create", :as => "public_quotes"
  
  get 'reposoir/sages-paroles/proposer.html' => "public/quotes#new", :as => "new_public_quote"
  get 'reposoir/photos.html' => "public/photos#index", :as => "public_photos"
  get 'reposoir/sages-paroles.html' => "public/quotes#index", :as => "public_quotes"
  
  
  get 'rubriques/:id.html' => "public/portfolios#show", :as => "public_portfolio"
  get 'vos-temoignages/:slug.:f' => 'public/testimonies#show', :as => :testimony, :f => "html"
  
  namespace :student do
    root :to => "topics#index", :id => 1
    resources :student_topics
    resources :student_messages
    resources :students
    resources :student_categories
    resources :student_users
    resources :password_resets
    
    resources :topics
    
    resources :student_user_images do
      member do
        get :rotate
      end
    end
    resources :auths do
      collection do 
        get :logout
      end
    end
    
  end
  
  
  namespace :public do
    resources :testimonies
    resources :portfolios
    resources :artworks
    resources :contacts
    resources :photos
    resources :quotes do
      collection do
        get :newphoto
        post :createphoto
      end
    end
    resources :articles
  end
  
  
	namespace :portlet do
		resources :event_contents
    resources :break_contents
		resources :download_contents
		resources :dynamic_contents
		resources :gallery_contents
		resources :gallery_images do
			collection do
				get :reorder
			end
		end
		resources :html_contents
		resources :image_contents
		resources :link_contents
		resources :img_link_contents
		resources :text_contents
		resources :map_contents
		resources :title_contents
		resources :table_contents
		resources :block_contents
		resources :table_rows
		resources :table_cols
		resources :portlets do
			collection do
				post :reorder
			end
		end
	end
  
	namespace :admin do
    resources :student_users
    resources :student_groups
    resources :note_files
    resources :notes
    resources :topics
    
    resources :testimonies
    resources :photos
    resources :quotes
    
    resources :artworks do
			collection do
				post :reorder
			end
		end
    resources :portfolios
    resources :password_resets
    
		resources :articles
		resources :categories
		

    resources :admin_auths do
        collection do 
          get :logout
        end
    end
    resources :admins
		
	
		
		resources :external_links do
			collection do
				get :cible
			end
		end
		
	
		resources :menus
		resources :menu_items do
			collection do
				get :cible
        post :reorder
			end
			member do
				get :clone
			end
		end
		resources :image_files do
			member do
				get :rotate
			end
		end
		resources :file_folders
		resources :data_files
		resources :pages
		resources :menu_urls
		resources :menu_aliases
		resources :blocks
		resources :albums
		
		resources :cibles
	

	end
  
  
  
  
  
  
  
  
  resources :download_data_files

  get 'pages/*url.:f' => 'public/menu_items#show', :as => :menu_item, :f => "html"

  get 'admin' => "admin/admin_auths#index"
  
  
  
  get "*url.:f" => 'public/menu_items#show'
  
  root 'public/menu_items#show'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

  # Example resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Example resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Example resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Example resource route with more complex sub-resources:
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', on: :collection
  #     end
  #   end

  # Example resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end
end
