OSDN Git Service

change page status for offset
[pettanr/pettanr.git] / app / controllers / balloons_controller.rb
1 class BalloonsController < ApplicationController
2   if Manifest.manifest.magic_numbers['run_mode'] == 0
3     before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
4     before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
5   else
6     before_filter :authenticate_reader, :only => [
7       :index, :show, :count, 
8       :by_author, :by_speech_balloon, :by_speech_balloon_template, :by_system_picture, 
9       :count_by_author, :count_by_speech_balloon, :count_by_speech_balloon_template, :count_by_system_picture
10     ]
11     before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy]
12     before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
13   end
14   
15   def index
16     filer_list
17   end
18   
19   def by_author
20     filer_list
21   end
22   
23   def by_speech_balloon
24     filer_list
25   end
26   
27   def by_speech_balloon_template
28     filer_list
29   end
30   
31   def by_system_picture
32     filer_list
33   end
34   
35   def show_html_format format
36     format.html {
37       @item.boosts 'post'
38       @balloon = @item
39     }
40   end
41   
42   def show
43     set_show
44     respond_to do |format|
45       show_html_format format
46       show_prof_format format
47       show_json_format format
48     end
49   end
50   
51   def count
52     list_count
53   end
54   
55   def count_by_author
56     list_count
57   end
58   
59   def count_by_speech_balloon
60     list_count
61   end
62   
63   def count_by_speech_balloon_template
64     list_count
65   end
66   
67   def count_by_system_picture
68     list_count
69   end
70   
71   def new
72     form_new
73   end
74   
75   def edit
76     form_edit
77   end
78   
79 end