OSDN Git Service

fix form extend
[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 => []
4     before_filter :authenticate_author, :only => []
5   else
6     before_filter :authenticate_reader, :only => [
7       :index, :show, :by_speech_balloon, :count, :count_by_speech_balloon
8     ]
9     before_filter :authenticate_user, :only => []
10     before_filter :authenticate_author, :only => []
11   end
12   before_filter :authenticate_admin!, :only => [:list, :browse]
13   
14   def self.model
15     Balloon
16   end
17   
18   def index
19     filer_list
20   end
21   
22   def by_speech_balloon
23     filer_list
24   end
25   
26   def show_html_format format
27     format.html {
28       @balloon = @item
29     }
30   end
31   
32   def show
33     set_show
34     respond_to do |format|
35       show_html_format format
36       show_prof_format format
37       show_json_format format
38     end
39   end
40   
41   def count
42     list_count
43   end
44   
45   def count_by_speech_balloon
46     list_count
47   end
48   
49 end