X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fcontrollers%2Fballoons_controller.rb;h=f9079cc11dabbee1ee218434f69c773268889205;hb=3d166dbc42073c430754b671cd9128af80da0b65;hp=e7847386093ac1480b2b2eac2be9a07a010b893d;hpb=faeb976db446399392c21deafadb2d6d856c896f;p=pettanr%2Fpettanr.git diff --git a/app/controllers/balloons_controller.rb b/app/controllers/balloons_controller.rb index e7847386..f9079cc1 100644 --- a/app/controllers/balloons_controller.rb +++ b/app/controllers/balloons_controller.rb @@ -1,21 +1,21 @@ class BalloonsController < ApplicationController if Manifest.manifest.magic_numbers['run_mode'] == 0 - before_filter :authenticate_user, :only => [] - before_filter :authenticate_author, :only => [] + before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy] + before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy] else before_filter :authenticate_reader, :only => [ - :index, :show, :by_speech_balloon, :count, :count_by_speech_balloon + :index, :show, + :by_author, :by_speech_balloon, :by_speech_balloon_template, :by_system_picture ] - before_filter :authenticate_user, :only => [] - before_filter :authenticate_author, :only => [] + before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy] + before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy] end - before_filter :authenticate_admin!, :only => [:list, :browse] - def self.model - Balloon + def index + filer_list end - def index + def by_author filer_list end @@ -23,23 +23,36 @@ class BalloonsController < ApplicationController filer_list end + def by_speech_balloon_template + filer_list + end + + def by_system_picture + filer_list + end + + def show_html_format format + format.html { + @item.boosts 'post' + @balloon = @item + } + end + def show - @item = Balloon.show(params[:id], @operators) + set_show respond_to do |format| - format.html { - @balloon = @item - } - format_prof format - format.json { render json: @item.to_json(Balloon.show_json_opt) } + show_html_format format + show_prof_format format + show_json_format format end end - def count - list_count + def new + form_new end - def count_by_speech_balloon - list_count + def edit + form_edit end end