OSDN Git Service

97644709a4bb8d057747098e48ef96921018b746
[pettanr/pettanr.git] / config / routes.rb
1 Pettanr::Application.routes.draw do
2
3   devise_for :users
4   devise_for :admins
5   devise_for :demand_users
6   
7   Pettanr::Application.licenses.each do |name, klass|
8     mount Module.const_get(klass)::Engine => "/#{name}"
9   end
10   Pettanr::Application.speech_balloons.each do |klass , name|
11     mount Module.const_get(klass)::Engine => "/#{name}"
12   end
13   
14   resources :authors do
15     new do
16       get :new
17     end
18     collection do
19       get :index
20       get :show
21       get :count
22       post :create
23       get :list
24     end
25     member do
26       get :edit
27       put :update
28       delete :destroy
29       get :browse
30       get :scrolls
31       get :scroll_panels
32       get :panels
33       get :panel_pictures
34       get :speech_balloons
35       get :ground_pictures
36       get :ground_colors
37     end
38   end
39   resources :artists do
40     new do
41       get :new
42     end
43     collection do
44       get :index
45       get :show
46       get :count
47       post :create
48       get :list
49     end
50     member do
51       get :edit
52       put :update
53       delete :destroy
54       get :browse
55       get :resource_pictures
56     end
57   end
58   resources :scrolls do
59     new do
60       get :new
61     end
62     collection do
63       get :index
64       get :show
65       get :count
66       post :create
67       get :list
68     end
69     member do
70       get :play
71       get :edit
72       put :update
73       delete :destroy
74       get :browse
75     end
76   end
77   resources :scroll_panels do
78     new do
79       get :new
80     end
81     collection do
82       get :index
83       get :show
84       post :create
85       get :list
86     end
87     member do
88       get :edit
89       get :scroll
90       put :update
91       delete :destroy
92       get :browse
93     end
94   end
95   resources :panels do
96     new do
97       get :new
98     end
99     collection do
100       get :index
101       get :show
102       get :count
103       post :create
104       get :list
105     end
106     member do
107       get :catch
108       get :edit
109       put :update
110       delete :destroy
111       get :browse
112     end
113   end
114   resources :panel_pictures do
115     new do
116       get :new
117     end
118     collection do
119       get :index
120       get :show
121       post :create
122       get :list
123     end
124     member do
125       get :edit
126       put :update
127       delete :destroy
128       get :browse
129     end
130   end
131   resources :speech_balloons do
132     new do
133       get :new
134     end
135     collection do
136       get :index
137       get :show
138       post :create
139       get :list
140     end
141     member do
142       get :edit
143       put :update
144       delete :destroy
145       get :browse
146     end
147   end
148   resources :balloons do
149     collection do
150       get :index
151       get :show
152       get :list
153     end
154     member do
155       get :browse
156     end
157   end
158   resources :speeches do
159     collection do
160       get :index
161       get :show
162       get :list
163     end
164     member do
165       get :browse
166     end
167   end
168   resources :ground_colors do
169     new do
170       get :new
171     end
172     collection do
173       get :index
174       get :show
175     end
176     member do
177       get :edit
178       put :update
179       delete :destroy
180       get :browse
181     end
182   end
183   resources :ground_pictures do
184     new do
185       get :new
186     end
187     collection do
188       get :index
189       get :show
190     end
191     member do
192       get :edit
193       put :update
194       delete :destroy
195       get :browse
196     end
197   end
198   resources :original_pictures do
199     new do
200       get :new
201     end
202     collection do
203       get :index
204       get :show
205       post :create
206       get :list
207     end
208     member do
209       get :edit
210       put :update
211       delete :destroy
212       get :history
213       get :browse
214     end
215   end
216   resources :resource_pictures do
217     collection do
218       get :index
219       get :show
220       get :new
221       post :create
222       get :count
223       get :list
224     end
225     member do
226       delete :destroy
227       get :credit
228       get :browse
229     end
230   end
231   resources :pictures do
232     collection do
233       get :show
234       get :credit
235       get :search
236       get :list
237     end
238     member do
239       get :credit
240       get :browse
241     end
242   end
243   resources :speech_balloon_templates do
244     collection do
245       get :index
246       get :show
247       get :list
248     end
249     member do
250       get :browse
251       delete :destroy
252     end
253   end
254   resources :licenses do
255     collection do
256       get :index
257       get :show
258       get :search
259       get :list
260     end
261     member do
262       get :browse
263     end
264   end
265   resources :license_groups do
266     collection do
267       get :index
268       get :show
269       get :list
270     end
271     member do
272       get :browse
273       delete :destroy
274     end
275   end
276   resources :original_picture_license_groups do
277     new do
278       post :new
279     end
280     collection do
281       post :create
282     end
283   end
284   resources :system_pictures do
285     collection do
286       get :index
287       get :show
288       get :list
289     end
290     member do
291       get :browse
292       delete :destroy
293     end
294   end
295   resources :provider_sources do
296     collection do
297       get :index
298       post :import
299       get :list
300       get :browse
301     end
302     member do
303     end
304   end
305   resources :providers do
306     collection do
307       get :index
308       get :show
309       get :list
310       get :browse
311     end
312     member do
313       delete :destroy
314     end
315   end
316   resources :provider_statuses do
317     collection do
318       get :index
319       get :show
320       get :list
321       get :browse
322     end
323     member do
324       get :edit
325       put :update
326       delete :destroy
327       post :licenses_import
328       post :artists_import
329       post :original_pictures_import
330       post :import
331     end
332   end
333   resources :demanders do
334     new do
335       get :new
336     end
337     collection do
338       get :index
339       get :show
340       post :create
341       get :list
342       get :browse
343       post :req
344       get :licenses_export
345       get :artists_export
346       get :original_pictures_export
347       get :pictures_export
348       get :export
349     end
350     member do
351       get :edit
352       put :update
353       delete :destroy
354     end
355   end
356   resources :demander_statuses do
357     collection do
358       get :index
359       get :show
360       get :list
361       get :browse
362     end
363     member do
364       get :edit
365       put :update
366       delete :destroy
367     end
368   end
369   # The priority is based upon order of creation:
370   # first created -> highest priority.
371
372   # Sample of regular route:
373   #   match 'products/:id' => 'catalog#view'
374   # Keep in mind you can assign values other than :controller and :action
375   match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
376   match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
377   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
378   match 'top/(:action)', :controller => 'top'
379   match 'home/(:action)', :controller => 'home'
380   match 'system/(:action)', :controller => 'system'
381   #match 'authors/(:action(/:id))', :controller => 'authors'
382   
383   # Sample of named route:
384   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
385   # This route can be invoked with purchase_url(:id => product.id)
386
387   # Sample resource route (maps HTTP verbs to controller actions automatically):
388   #   resources :products
389
390   # Sample resource route with options:
391   #   resources :products do
392   #     member do
393   #       get 'short'
394   #       post 'toggle'
395   #     end
396   #
397   #     collection do
398   #       get 'sold'
399   #     end
400   #   end
401
402   # Sample resource route with sub-resources:
403   #   resources :products do
404   #     resources :comments, :sales
405   #     resource :seller
406   #   end
407
408   # Sample resource route with more complex sub-resources
409   #   resources :products do
410   #     resources :comments
411   #     resources :sales do
412   #       get 'recent', :on => :collection
413   #     end
414   #   end
415
416   # Sample resource route within a namespace:
417   #   namespace :admin do
418   #     # Directs /admin/products/* to Admin::ProductsController
419   #     # (app/controllers/admin/products_controller.rb)
420   #     resources :products
421   #   end
422
423   # You can have the root of your site routed with "root"
424   # just remember to delete public/index.html.
425   root :to => 'top#index'
426
427   # See how all your routes lay out with "rake routes"
428
429   # This is a legacy wild controller route that's not recommended for RESTful applications.
430   # Note: This route will make all actions in every controller accessible via GET requests.
431   match ':controller(/:action(/:id(.:format)))'
432 end