Module: Atrium::Routes::RouteSets

Included in:
Atrium::Routes
Defined in:
lib/atrium/routes.rb

Instance Method Summary collapse

Instance Method Details

#atrium_collectionsObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/atrium/routes.rb', line 32

def atrium_collections
  add_routes do |options|
    namespace :atrium do
      resources :collections, :exhibits do
        resource :showcases, :only => [:new]
      end
      resources :showcases, :only => [:show]
      resources :descriptions do
        resource :essays
      end
    end
    match 'atrium_collections/:id/exhibit_order',                              :to => 'atrium/collection_exhibit_order#index',      :as => 'atrium_collection_exhibit_order'
    match 'atrium_collections/:id/exhibit_order/update',                       :to => 'atrium/collection_exhibit_order#update',     :as => 'update_atrium_collection_exhibit_order', :via => :post
    match 'atrium_collections/:collection_id/catalog',                         :to => 'catalog#index',                              :as => 'atrium_collection_home', :via => :get
    match 'atrium_collections/configure/:id',                                  :to => 'atrium/collections#home_page_text_config',   :as => 'atrium_collection_text_configure'
    match 'atrium_collections/set_scope/:id',                                  :to => 'atrium/collections#set_collection_scope',    :as => 'atrium_set_collection_scope'
    match 'atrium_collections/unset_scope/:id',                                :to => 'atrium/collections#unset_collection_scope',  :as => 'atrium_unset_collection_scope'
    match 'atrium_exhibits/:id/facet_order',                                   :to => 'atrium/exhibit_facet_order#index',           :as => 'atrium_exhibit_facet_order'
    match 'atrium_exhibits/:id/facet_order/update',                            :to => 'atrium/exhibit_facet_order#update',          :as => 'update_atrium_exhibit_facet_order', :via => :post
    match 'atrium_exhibits/set_scope/:id',                                     :to => 'atrium/exhibits#set_exhibit_scope',          :as => 'atrium_set_exhibit_scope'
    match 'atrium_exhibits/unset_scope/:id',                                   :to => 'atrium/exhibits#unset_exhibit_scope',        :as => 'atrium_unset_exhibit_scope'
    match 'atrium_exhibits/:id/showcases/:showcase_id',                        :to => 'atrium/exhibits#show',                       :as => 'atrium_exhibit_showcase'
    match 'atrium_showcases/featured/:id',                                     :to => 'atrium/showcases#featured',                  :as => 'atrium_showcase_featured'
    match 'atrium_showcases/remove_featured/:id',                              :to => 'atrium/showcases#remove_featured',           :as => 'atrium_showcase_remove_featured', :via => :post
    match 'atrium_showcases/refresh/:id',                                      :to => 'atrium/showcases#refresh_showcase',          :as => 'atrium_showcase_refresh'
    match 'atrium_collections/:collection_id/catalog/:id',                     :to => 'catalog#show',                               :as => 'atrium_collection_catalog'
    match 'atrium_collections/:collection_id/browse/:id',                      :to => 'catalog#show',                               :as => 'atrium_collection_browse', :defaults=>{:atrium_collection_browse=>true}
    match 'atrium_collections/:collection_id/exhibits/:exhibit_id/browse/:id', :to => 'catalog#show',                               :as => 'atrium_collection_exhibit_browse', :defaults=>{:atrium_exhibit_browse=>true}
    match 'atrium_collections/:id/showcases/:showcase_id',                     :to => 'atrium/collections#show',                    :as => 'atrium_collection_showcase'
    match 'atrium_exhibits/:exhibit_id/browse/:id',                            :to => 'catalog#show',                               :as => 'atrium_exhibit_browse', :defaults=>{:atrium_exhibit_browse=>true}
    match 'atrium_showcases/:showcase_id/descriptions',                        :to => 'atrium/descriptions#index',                  :as => 'atrium_descriptions', :via => :get
    match 'atrium_showcases/:showcase_id/descriptions',                        :to => 'atrium/descriptions#create',                 :as => 'atrium_descriptions', :via => :post
    match 'atrium_showcases/:showcase_id/descriptions/new',                    :to => 'atrium/descriptions#new',                    :as => 'new_atrium_description'
    match 'atrium/customization/start',                                        :to => 'atrium/customization#start',                 :as => 'start_atrium_customization'
    match 'atrium/customization/stop',                                         :to => 'atrium/customization#stop',                  :as => 'stop_atrium_customization'
    match 'atrium_descriptions/add/:showcase_id',                              :to => 'atrium/descriptions#add_from_solr',          :as => 'atrium_descriptions_add'
    match 'atrium_descriptions/link/:showcase_id',                             :to => 'atrium/descriptions#save_ids_to_descriptions',      :as => 'atrium_descriptions_link'
  end
end

#catalogObject



72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/atrium/routes.rb', line 72

def catalog
  add_routes do |options|
    match 'catalog/:id/edit', :to => 'catalog#edit', :as => 'edit_catalog'
    # The delete method renders a confirmation page with a button to submit actual destroy request
    match 'catalog/:id/delete', :to => 'catalog#delete', :as => 'delete_catalog'
	  ### The rest of these routes are defined in blacklight
    #resources :catalog, :id=> /.+/
   # resources :catalog, :only => [:index, :show], :controller => "hydra_head/catalog", :path_prefix => HydraHead::Engine.config.mount_at, :as => "hydra_head", :id=> /.+/
    #match 'catalog/:id', :to => "hydra_head/catalog#show", :path_prefix => HydraHead::Engine.config.mount_at, :as => "catalog", :id => /.+/
    #match 'catalog/:id', :to => "hydra_head/catalog#show", :id => /.+/
    # match 'about', :to => 'catalog#about', :as => 'about'
  end
end

#getObject



87
88
89
90
91
# File 'lib/atrium/routes.rb', line 87

def get
  add_routes do |options|
    resources :get, :only=>:show
  end
end