end
before_filter :authenticate_admin!, :only => [:list, :browse, :destroy]
- # GET /speech_balloon_templates
- # GET /speech_balloon_templates.json
def index
@speech_balloon_templates = SpeechBalloonTemplate.enable_list
respond_to do |format|
- format.html # index.html.erb
+ format.html {
+ render :template => 'system/filer', :locals => {
+ :items => @speech_balloon_templates, :model => SpeechBalloonTemplate,
+ :roles => [@user, @admin], :pager => nil
+ }
+ }
format.json { render json: @speech_balloon_templates.to_json(SpeechBalloonTemplate.list_json_opt) }
end
end
- # GET /speech_balloon_templates/1
- # GET /speech_balloon_templates/1.json
def show
- @speech_balloon_template = SpeechBalloonTemplate.show(params[:id], [@user, @admin])
+ @item = SpeechBalloonTemplate.show(params[:id], [@user, @admin])
respond_to do |format|
format.html # show.html.erb
+ format_prof format
format.json {
- render :json => @speech_balloon_template.to_json(SpeechBalloonTemplate.show_json_opt)
+ render :json => @item.to_json(SpeechBalloonTemplate.show_json_opt)
}
format.jsonp {
- render :json => "callback(" + @speech_balloon_template.to_json() + ")"
+ render :json => "callback(" + @item.to_json() + ")"
}
end
end
end
end
- # DELETE /speech_balloon_templates/1
- # DELETE /speech_balloon_templates/1.json
def destroy
@speech_balloon_template = SpeechBalloonTemplate.find(params[:id])
@speech_balloon_template.destroy