class SpeechBalloonsController < ApplicationController
- before_filter :authenticate_admin!, :only => [:list, :browse]
-
- def list
- @speech_balloons = SpeechBalloon.all
-
- respond_to do |format|
- format.html { render layout: 'system' }
- format.json { render json: @speech_balloons }
- end
+ if Manifest.manifest.magic_numbers['run_mode'] == 0
+ before_filter :authenticate_user, :only => []
+ before_filter :authenticate_author, :only => []
+ else
+ before_filter :authenticate_reader, :only => [
+ :index, :show, :by_panel, :by_author, :by_speech_balloon_template, :count, :count_by_panel, :count_by_author, :count_by_speech_balloon_template
+ ]
+ before_filter :authenticate_user, :only => []
+ before_filter :authenticate_author, :only => []
+ end
+
+ def index
+ filer_list
+ end
+
+ def by_panel
+ filer_list
+ end
+
+ def by_author
+ filer_list
+ end
+
+ def by_speech_balloon_template
+ filer_list
end
-
- def browse
- @speech_balloon = SpeechBalloon.find(params[:id])
-
+
+ def show_html_format format
+ format.html {
+ @item.boosts 'post'
+ @speech_balloon = @item
+ }
+ end
+
+ def show
+ set_show
respond_to do |format|
- format.html { render layout: 'system' }
- format.json { render json: @speech_balloon }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
-
+
+ def count
+ list_count
+ end
+
+ def count_by_panel
+ list_count
+ end
+
+ def count_by_author
+ list_count
+ end
+
+ def count_by_speech_balloon_template
+ list_count
+ end
+
end