Spotlight::Engine.routes.draw do devise_for :contact_email, class_name: "Spotlight::ContactEmail", only: [:confirmations] resources :exhibits, path: '/', except: [:index, :show] do member do get 'exhibit', to: 'exhibits#show', as: 'get' post 'import', to: 'exhibits#process_import' patch 'import', to: 'exhibits#process_import' post 'reindex', to: 'exhibits#reindex' end resources :attachments, only: :create resource :contact_form, path: "contact", only: [:new, :create] resource :blacklight_configuration, only: [:update] resource :appearance, only: [:edit, :update] get 'edit/metadata', to: "blacklight_configurations#edit_metadata_fields" get 'edit/facets', to: "blacklight_configurations#edit_facet_fields" get 'edit/sort_fields', to: "blacklight_configurations#edit_sort_fields" get 'metadata', to: 'blacklight_configurations#metadata_fields' get 'available_search_views', to: 'blacklight_configurations#available_search_views' blacklight_for :catalog, only: [:export] resources :catalog do collection do get 'admin' get 'autocomplete' end get "facet/:id", :to => "catalog#facet", :as => "catalog_facet" put 'visiblity', to: "catalog#make_public" delete 'visiblity', to: "catalog#make_private" end get "catalog/:id", to: "catalog#show", as: "solr_document" resources :solr_document, only: [:edit], to: 'catalog#edit' resources :custom_fields resource :dashboard, only: :show resources :resources do collection do post :reindex_all end end post :csv_uploads, to: "resources/upload#csv_upload", path: 'upload_resources/csv_upload', as: :resources_csv_uploads resources :resources_uploads, controller: 'resources/upload', path: 'upload_resources' do collection do get :template end end resources :resources_csvs, controller: 'resources/csv', path: 'csv_resources' do collection do get :template end end resources :searches do collection do patch :update_all end member do get :autocomplete end end resources :browse, only: [:index, :show] resources :tags, only: [:index, :destroy] resources :contacts, only: [:edit, :update, :destroy] resources :about_pages, path: 'about' do collection do patch 'contacts' => 'about_pages#update_contacts' resources :contacts, only: [:new, :create] patch :update_all end end resources :feature_pages, path: 'feature' do collection do patch :update_all end end resource :home_page, path: 'home', controller: "home_pages" post '/pages/:id/preview' => 'pages#preview', as: :preview_block resources :lock, only: [:destroy] resources :roles, path: 'users', only: [:index, :create, :destroy] do collection do patch :update_all end end post 'solr/update' => 'solr#update' end post 'versions/:id/revert' => 'versions#revert', as: :revert_version get '/:exhibit_id' => 'home_pages#show', as: :exhibit_root end