OSDN Git Service

rename model name
[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 index
14     filer_list
15   end
16   
17   def by_panel
18     filer_list
19   end
20   
21   def by_author
22     filer_list
23   end
24   
25   def by_speech_balloon_template
26     filer_list
27   end
28   
29   def show_html_format format
30     format.html {
31       @item.boosts 'post'
32       @speech_balloon = @item
33     }
34   end
35   
36   def show
37     set_show
38     respond_to do |format|
39       show_html_format format
40       show_prof_format format
41       show_json_format format
42     end
43   end
44   
45   def count
46     list_count
47   end
48   
49   def count_by_panel
50     list_count
51   end
52   
53   def count_by_author
54     list_count
55   end
56   
57   def count_by_speech_balloon_template
58     list_count
59   end
60   
61 end