Rails.application.routes.draw do
  namespace :admin do
    namespace :articles do
      get 'all_page/publish'
      get 'all_page/unpublish'
      resources :all_page
    end
    root 'home#index'
    resources :home
    get 'all_page/publish'
    get 'all_page/unpublish'
    get 'all_page/change_priority'
    resources :all_page
    resources :article
  end
  devise_for :admins
  get 'site/kontakt'
  get 'site/preview/:id' => 'site#preview'
  root 'site#index'
  resources :site

  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
