OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / controllers / writing_formats_controller.rb
1 class WritingFormatsController < ApplicationController
2   if Manifest.manifest.magic_numbers['run_mode'] == 0
3     before_filter :authenticate_user, :only => []
4   else
5     before_filter :authenticate_reader, :only => [:index, :show, :count]
6     before_filter :authenticate_user, :only => []
7   end
8   before_filter :authenticate_admin!, :only => [:destroy]
9
10   def self.model
11     WritingFormat
12   end
13   
14   def index
15     filer_list
16   end
17
18   def show_html_format format
19     format.html {
20       @writing_format = @item
21     }
22   end
23   
24   def show
25     set_show
26     respond_to do |format|
27       show_html_format format
28       show_prof_format format
29       show_json_format format
30     end
31   end
32
33   def count
34     list_count
35   end
36   
37 end