OSDN Git Service

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