OSDN Git Service

rename model name
[pettanr/pettanr.git] / app / controllers / speech_balloon_templates_controller.rb
1 class SpeechBalloonTemplatesController < ApplicationController
2   if Manifest.manifest.magic_numbers['run_mode'] == 0
3     before_filter :authenticate_user, :only => []
4   else
5     before_filter :authenticate_reader, :only => [
6       :index, :show, :by_panel, :by_system_picture, :count, :count_by_panel, :count_by_system_picture
7     ]
8     before_filter :authenticate_user, :only => []
9   end
10   before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
11   
12   def index
13     filer_list
14   end
15   
16   def by_panel
17     filer_list
18   end
19   
20   def by_system_picture
21     filer_list
22   end
23   
24   def show_html_format format
25     format.html {
26     }
27   end
28   
29   def show
30     set_show
31     respond_to do |format|
32       show_html_format format
33       show_prof_format format
34       show_json_format format
35     end
36   end
37   
38   def count
39     list_count
40   end
41   
42   def count_by_panel
43     list_count
44   end
45   
46   def count_by_system_picture
47     list_count
48   end
49   
50   def new
51     form_new
52   end
53   
54   def edit
55     form_edit
56   end
57   
58   def destroy
59     @item = SpeechBalloonTemplate.find(params[:id])
60     @item.destroy
61
62     respond_to do |format|
63       format.html { redirect_to :action => :list }
64       format.json { head :ok }
65     end
66   end
67 end