OSDN Git Service

fix editor
[pettanr/pettanr.git] / app / controllers / speech_balloons_controller.rb
1 class SpeechBalloonsController < 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_panel, :by_author, :by_speech_balloon_template, :count, :count_by_panel, :count_by_author, :count_by_speech_balloon_template
8     ]
9     before_filter :authenticate_user, :only => []
10     before_filter :authenticate_author, :only => []
11   end
12   
13   def self.model
14     SpeechBalloon
15   end
16   
17   def index
18     filer_list
19   end
20   
21   def by_panel
22     filer_list
23   end
24   
25   def by_author
26     filer_list
27   end
28   
29   def by_speech_balloon_template
30     filer_list
31   end
32   
33   def show_html_format format
34     format.html {
35       @item.boosts 'post'
36       @speech_balloon = @item
37     }
38   end
39   
40   def show
41     set_show
42     respond_to do |format|
43       show_html_format format
44       show_prof_format format
45       show_json_format format
46     end
47   end
48   
49   def count
50     list_count
51   end
52   
53   def count_by_panel
54     list_count
55   end
56   
57   def count_by_author
58     list_count
59   end
60   
61   def count_by_speech_balloon_template
62     list_count
63   end
64   
65 end