1 class StorySheetsController < ApplicationController
2 if Manifest.manifest.magic_numbers['run_mode'] == 0
3 before_action :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
4 before_action :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
6 before_action :authenticate_reader, :only => [
7 :index, :show, :by_story, :by_sheet, :by_author
9 before_action :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
10 before_action :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
18 filer_list param: params[:id]
22 filer_list param: params[:id]
26 filer_list param: params[:id]
31 respond_to do |format|
32 show_prof_format format
33 show_json_format format
47 @item = @my_model_class.new
49 @item.attributes = @item.permit_params params
50 @item.overwrite @operators
51 @binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
52 @panel = @my_model_class.destination_model.show(@item.destination_id, @operators) if @item.destination_id
54 leaf_render_create play_story_path(@binder)
59 @item = @my_model_class.edit(params[:id], @operators)
61 @item.attributes = @item.permit_params params
62 @item.overwrite @operators
63 @binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
64 # no check permission for destination
65 # swapable hidden panel
66 #@panel = @my_model_class.destination_model.show(@item.destination_id, @operators) if @item.destination_id
68 leaf_render_update ot, play_story_path(@binder)
73 @item = @my_model_class.edit(params[:id], @operators)
74 @binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
75 render_destroy play_story_path(@binder)