OSDN Git Service

t#31470:create pager
[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     collection do
174       get :index
175       get :show
176     end
177     member do
178       get :browse
179     end
180   end
181   resources :original_pictures do
182     new do
183       get :new
184     end
185     collection do
186       get :index
187       get :show
188       post :create
189       get :list
190     end
191     member do
192       get :edit
193       put :update
194       delete :destroy
195       get :history
196       get :browse
197     end
198   end
199   resources :resource_pictures do
200     collection do
201       get :index
202       get :show
203       get :new
204       post :create
205       get :count
206       get :list
207     end
208     member do
209       delete :destroy
210       get :credit
211       get :browse
212     end
213   end
214   resources :pictures do
215     collection do
216       get :show
217       get :credit
218       get :search
219       get :list
220     end
221     member do
222       get :credit
223       get :browse
224     end
225   end
226   resources :speech_balloon_templates do
227     collection do
228       get :index
229       get :show
230       get :list
231     end
232     member do
233       get :browse
234       delete :destroy
235     end
236   end
237   resources :licenses do
238     collection do
239       get :index
240       get :show
241       get :search
242       get :list
243     end
244     member do
245       get :browse
246     end
247   end
248   resources :license_groups do
249     collection do
250       get :index
251       get :show
252       get :list
253     end
254     member do
255       get :browse
256       delete :destroy
257     end
258   end
259   resources :original_picture_license_groups do
260     new do
261       post :new
262     end
263     collection do
264       post :create
265     end
266   end
267   resources :system_pictures do
268     collection do
269       get :index
270       get :show
271       get :list
272     end
273     member do
274       get :browse
275       delete :destroy
276     end
277   end
278   resources :provider_sources do
279     collection do
280       get :index
281       post :import
282       get :list
283       get :browse
284     end
285     member do
286     end
287   end
288   resources :providers do
289     collection do
290       get :index
291       get :show
292       get :list
293       get :browse
294     end
295     member do
296       delete :destroy
297     end
298   end
299   resources :provider_statuses do
300     collection do
301       get :index
302       get :show
303       get :list
304       get :browse
305     end
306     member do
307       get :edit
308       put :update
309       delete :destroy
310       post :licenses_import
311       post :artists_import
312       post :original_pictures_import
313       post :import
314     end
315   end
316   resources :demanders do
317     new do
318       get :new
319     end
320     collection do
321       get :index
322       get :show
323       post :create
324       get :list
325       get :browse
326       post :req
327       get :licenses_export
328       get :artists_export
329       get :original_pictures_export
330       get :pictures_export
331       get :export
332     end
333     member do
334       get :edit
335       put :update
336       delete :destroy
337     end
338   end
339   resources :demander_statuses do
340     collection do
341       get :index
342       get :show
343       get :list
344       get :browse
345     end
346     member do
347       get :edit
348       put :update
349       delete :destroy
350     end
351   end
352   # The priority is based upon order of creation:
353   # first created -> highest priority.
354
355   # Sample of regular route:
356   #   match 'products/:id' => 'catalog#view'
357   # Keep in mind you can assign values other than :controller and :action
358   match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
359   match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
360   #match 'stories/comic/:id(.:format)' => 'stories#comic'
361   match 'top/(:action)', :controller => 'top'
362   match 'home/(:action)', :controller => 'home'
363   match 'system/(:action)', :controller => 'system'
364   #match 'authors/(:action(/:id))', :controller => 'authors'
365   
366   # Sample of named route:
367   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
368   # This route can be invoked with purchase_url(:id => product.id)
369
370   # Sample resource route (maps HTTP verbs to controller actions automatically):
371   #   resources :products
372
373   # Sample resource route with options:
374   #   resources :products do
375   #     member do
376   #       get 'short'
377   #       post 'toggle'
378   #     end
379   #
380   #     collection do
381   #       get 'sold'
382   #     end
383   #   end
384
385   # Sample resource route with sub-resources:
386   #   resources :products do
387   #     resources :comments, :sales
388   #     resource :seller
389   #   end
390
391   # Sample resource route with more complex sub-resources
392   #   resources :products do
393   #     resources :comments
394   #     resources :sales do
395   #       get 'recent', :on => :collection
396   #     end
397   #   end
398
399   # Sample resource route within a namespace:
400   #   namespace :admin do
401   #     # Directs /admin/products/* to Admin::ProductsController
402   #     # (app/controllers/admin/products_controller.rb)
403   #     resources :products
404   #   end
405
406   # You can have the root of your site routed with "root"
407   # just remember to delete public/index.html.
408   root :to => 'top#index'
409
410   # See how all your routes lay out with "rake routes"
411
412   # This is a legacy wild controller route that's not recommended for RESTful applications.
413   # Note: This route will make all actions in every controller accessible via GET requests.
414   match ':controller(/:action(/:id(.:format)))'
415 end