OSDN Git Service

add show
[pettanr/pettanr.git] / app / controllers / panel_pictures_controller.rb
1 class PanelPicturesController < 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, :count, :count_by_panel, :count_by_author
8     ]
9     before_filter :authenticate_user, :only => []
10     before_filter :authenticate_author, :only => []
11   end
12   
13   def self.model
14     PanelPicture
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 show_html_format format
30     format.html {
31       @panel_picture = @item
32     }
33   end
34   
35   def show
36     set_show
37     respond_to do |format|
38       show_html_format format
39       show_prof_format format
40       show_json_format format
41     end
42   end
43   
44   def count
45     list_count
46   end
47   
48   def count_by_panel
49     list_count
50   end
51   
52   def count_by_author
53     list_count
54   end
55   
56 end