OSDN Git Service

fix picture index action
[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   Manifest.manifest.system_resources.engine_resources.each do |engine_resource_name, engine_resource|
8     if engine_resource.add_route?
9       engine_resource.resource_items.each do |klass, name|
10         mount Module.const_get(klass)::Engine => "/#{name}"
11       end
12     end
13   end
14   
15   resources :scrolls do
16     new do
17       get :new
18     end
19     collection do
20       get :index
21       get :show
22       get :count
23       post :create
24     end
25     member do
26       get :scroll_panels
27       get :panels
28       get :by_author
29       get :by_panel
30       get :scroll_panels_count
31       get :panels_count
32       get :count_by_author
33       get :count_by_panel
34       get :play
35       get :edit
36       put :update
37       delete :destroy
38       get :browse
39     end
40   end
41   resources :scroll_panels do
42     new do
43       get :new
44     end
45     collection do
46       get :index
47       get :show
48       post :create
49     end
50     member do
51       get :by_panel
52       get :by_scroll
53       get :count_by_panel
54       get :count_by_scroll
55       get :edit
56       put :update
57       delete :destroy
58     end
59   end
60   resources :comics do
61     new do
62       get :new
63     end
64     collection do
65       get :index
66       get :show
67       get :count
68       post :create
69     end
70     member do
71       get :stories
72       get :by_author
73       get :by_me
74       get :stories_count
75       get :count_by_author
76       get :count_by_me
77       get :play
78       get :edit
79       put :update
80       delete :destroy
81     end
82   end
83   resources :stories do
84     new do
85       get :new
86     end
87     collection do
88       get :index
89       get :show
90       post :create
91     end
92     member do
93       get :story_sheets
94       get :sheets
95       get :by_comic
96       get :by_sheet
97       get :by_author
98       get :story_sheets_count
99       get :sheets_count
100       get :count_by_comic
101       get :count_by_sheet
102       get :count_by_author
103       get :play
104       get :edit
105       put :update
106       delete :destroy
107     end
108   end
109   resources :story_sheets do
110     new do
111       get :new
112     end
113     collection do
114       get :index
115       get :show
116       post :create
117     end
118     member do
119       get :by_story
120       get :by_sheet
121       get :count_by_story
122       get :count_by_sheet
123       get :edit
124       put :update
125       delete :destroy
126     end
127   end
128   resources :sheets do
129     new do
130       get :new
131     end
132     collection do
133       get :index
134       get :show
135       get :count
136       post :create
137     end
138     member do
139       get :story_sheets
140       get :stories
141       get :sheet_panels
142       get :panels
143       get :by_story
144       get :by_panel
145       get :by_author
146       get :story_sheets_count
147       get :stories_count
148       get :sheet_panels_count
149       get :panels_count
150       get :count_by_story
151       get :count_by_panel
152       get :count_by_author
153       get :play
154       get :edit
155       put :update
156       delete :destroy
157     end
158   end
159   resources :sheet_panels do
160     new do
161       get :new
162     end
163     collection do
164       get :index
165       get :show
166       post :create
167     end
168     member do
169       get :by_sheet
170       get :by_panel
171       get :count_by_sheet
172       get :count_by_panel
173       get :edit
174       put :update
175       delete :destroy
176     end
177   end
178   resources :panels do
179     new do
180       get :new
181     end
182     collection do
183       get :index
184       get :show
185       get :count
186       post :create
187     end
188     member do
189       get :scroll_panels
190       get :scrolls
191       get :sheet_panels
192       get :sheets
193       get :panel_pictures
194       get :speech_balloons
195       get :ground_pictures
196       get :ground_colors
197       get :by_scroll
198       get :by_sheet
199       get :by_author
200       get :scroll_panels_count
201       get :scrolls_count
202       get :sheet_panels_count
203       get :sheets_count
204       get :panel_pictures_count
205       get :speech_balloons_count
206       get :ground_pictures_count
207       get :ground_colors_count
208       get :count_by_scroll
209       get :count_by_sheet
210       get :count_by_author
211       get :catch
212       get :edit
213       put :update
214       delete :destroy
215     end
216   end
217   resources :panel_pictures do
218     new do
219       get :new
220     end
221     collection do
222       get :index
223       get :show
224       post :create
225     end
226     member do
227       get :by_panel
228       get :by_author
229       get :count_by_panel
230       get :count_by_author
231       get :edit
232       put :update
233       delete :destroy
234     end
235   end
236   resources :speech_balloons do
237     new do
238       get :new
239     end
240     collection do
241       get :index
242       get :show
243       post :create
244     end
245     member do
246       get :by_panel
247       get :by_author
248       #get :by_speech_balloon_template
249       get :count_by_panel
250       get :count_by_author
251       get :edit
252       put :update
253       delete :destroy
254     end
255   end
256   resources :balloons do
257     collection do
258       get :index
259       get :show
260     end
261     member do
262       get :by_speech_balloon
263       #get :by_system_picture
264       get :count_by_speech_balloon
265       get :edit
266       put :update
267     end
268   end
269   resources :speeches do
270     collection do
271       get :index
272       get :show
273     end
274     member do
275       get :by_speech_balloon
276       get :by_writing_format
277       get :count_by_speech_balloon
278       get :count_by_writing_format
279       get :edit
280       put :update
281     end
282   end
283   resources :ground_pictures do
284     new do
285       get :new
286     end
287     collection do
288       get :index
289       get :show
290     end
291     member do
292       get :by_panel
293       get :by_author
294       get :count_by_panel
295       get :count_by_author
296       get :edit
297       put :update
298       delete :destroy
299     end
300   end
301   resources :ground_colors do
302     new do
303       get :new
304     end
305     collection do
306       get :index
307       get :show
308     end
309     member do
310       get :by_panel
311       get :by_author
312       get :count_by_panel
313       get :count_by_author
314       get :edit
315       put :update
316       delete :destroy
317     end
318   end
319   resources :original_pictures do
320     new do
321       get :new
322     end
323     collection do
324       get :index
325       get :show
326       post :create
327     end
328     member do
329       get :edit
330       put :update
331       delete :destroy
332       get :history
333     end
334   end
335   resources :pictures do
336     collection do
337       get :index
338       get :show
339       get :credit
340       get :search
341       get :list
342     end
343     member do
344       get :credit
345       get :browse
346     end
347   end
348   resources :resource_pictures do
349     collection do
350       get :index
351       get :show
352       get :new
353       post :create
354       get :count
355     end
356     member do
357       get :by_license
358         get :by_license_group
359       get :by_artist
360       get :count_by_license
361         get :count_by_license_group
362       get :count_by_artist
363       delete :destroy
364       get :credit
365     end
366   end
367   resources :speech_balloon_templates do
368     collection do
369       get :index
370       get :show
371     end
372     member do
373       get :speech_balloons
374       get :panels
375       get :by_system_picture
376       get :speech_balloons_count
377       get :panels_count
378       get :count_by_system_picture
379       delete :destroy
380     end
381   end
382   resources :writing_formats do
383     collection do
384       get :index
385       get :show
386     end
387     member do
388       get :speeches
389       get :by_system_picture
390       get :speeches_count
391       get :count_by_system_picture
392     end
393   end
394   resources :license_groups do
395     collection do
396       get :index
397       get :show
398     end
399     member do
400       get :licenses
401       get :licenses_count
402       delete :destroy
403     end
404   end
405   resources :licenses do
406     collection do
407       get :index
408       get :show
409       get :search
410     end
411     member do
412       get :resource_pictures
413       get :by_license_group
414       get :by_system_picture
415       get :resource_pictures_count
416       get :count_by_license_group
417       get :count_by_system_picture
418     end
419   end
420   resources :authors do
421     new do
422       get :new
423     end
424     collection do
425       get :index
426       get :show
427       get :count
428       post :create
429     end
430     member do
431       get :scrolls
432       get :scroll_panels
433       get :comics
434       get :stories
435       get :story_sheets
436       get :sheets
437       get :sheet_panels
438       get :panels
439       get :panel_pictures
440       get :speech_balloons
441       get :ground_pictures
442       get :ground_colors
443       get :scrolls_count
444       get :scroll_panels_count
445       get :comics_count
446       get :stories_count
447       get :story_sheets_count
448       get :sheets_count
449       get :sheet_panels_count
450       get :panels_count
451       get :panel_pictures_count
452       get :speech_balloons_count
453       get :ground_pictures_count
454       get :ground_colors_count
455       get :edit
456       put :update
457       delete :destroy
458     end
459   end
460   resources :artists do
461     new do
462       get :new
463     end
464     collection do
465       get :index
466       get :show
467       get :count
468       post :create
469     end
470     member do
471       get :resource_pictures
472       get :resource_pictures_count
473       get :edit
474       put :update
475       delete :destroy
476     end
477   end
478   resources :system_pictures do
479     collection do
480       get :index
481       get :show
482     end
483     member do
484       #get :balloons
485       get :speech_balloon_templates
486       get :licenses
487       get :speech_balloon_templates_count
488       get :licenses_count
489       delete :destroy
490     end
491   end
492   resources :original_picture_license_groups do
493     new do
494       post :new
495     end
496     collection do
497       post :create
498     end
499   end
500   resources :provider_sources do
501     collection do
502       get :index
503       post :import
504       get :list
505       get :browse
506     end
507     member do
508     end
509   end
510   resources :providers do
511     collection do
512       get :index
513       get :show
514       get :list
515       get :browse
516     end
517     member do
518       delete :destroy
519     end
520   end
521   resources :provider_statuses do
522     collection do
523       get :index
524       get :show
525       get :list
526       get :browse
527     end
528     member do
529       get :edit
530       put :update
531       delete :destroy
532       post :licenses_import
533       post :artists_import
534       post :original_pictures_import
535       post :import
536     end
537   end
538   resources :demanders do
539     new do
540       get :new
541     end
542     collection do
543       get :index
544       get :show
545       post :create
546       get :list
547       get :browse
548       post :req
549       get :licenses_export
550       get :artists_export
551       get :original_pictures_export
552       get :pictures_export
553       get :export
554     end
555     member do
556       get :edit
557       put :update
558       delete :destroy
559     end
560   end
561   resources :demander_statuses do
562     collection do
563       get :index
564       get :show
565       get :list
566       get :browse
567     end
568     member do
569       get :edit
570       put :update
571       delete :destroy
572     end
573   end
574   # The priority is based upon order of creation:
575   # first created -> highest priority.
576
577   # Sample of regular route:
578   #   match 'products/:id' => 'catalog#view'
579   # Keep in mind you can assign values other than :controller and :action
580   
581   # resource_pictures/1.png?subdir=full
582   # match 'resource_pictures/full/:id(.:format)/' => 'resource_pictures#show'
583   # match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
584   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
585   match 'top/(:action)', :controller => 'top'
586   match 'home/(:action)', :controller => 'home'
587   match 'system/(:action)', :controller => 'system'
588   #match 'authors/(:action(/:id))', :controller => 'authors'
589   
590   # Sample of named route:
591   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
592   # This route can be invoked with purchase_url(:id => product.id)
593
594   # Sample resource route (maps HTTP verbs to controller actions automatically):
595   #   resources :products
596
597   # Sample resource route with options:
598   #   resources :products do
599   #     member do
600   #       get 'short'
601   #       post 'toggle'
602   #     end
603   #
604   #     collection do
605   #       get 'sold'
606   #     end
607   #   end
608
609   # Sample resource route with sub-resources:
610   #   resources :products do
611   #     resources :comments, :sales
612   #     resource :seller
613   #   end
614
615   # Sample resource route with more complex sub-resources
616   #   resources :products do
617   #     resources :comments
618   #     resources :sales do
619   #       get 'recent', :on => :collection
620   #     end
621   #   end
622
623   # Sample resource route within a namespace:
624   #   namespace :admin do
625   #     # Directs /admin/products/* to Admin::ProductsController
626   #     # (app/controllers/admin/products_controller.rb)
627   #     resources :products
628   #   end
629
630   # You can have the root of your site routed with "root"
631   # just remember to delete public/index.html.
632   root :to => 'top#index'
633
634   # See how all your routes lay out with "rake routes"
635
636   # This is a legacy wild controller route that's not recommended for RESTful applications.
637   # Note: This route will make all actions in every controller accessible via GET requests.
638   match ':controller(/:action(/:id(.:format)))'
639 end