1 class ComicStoriesController < 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_comic, :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 format.json { render json: @item.to_json }
51 @item = @my_model_class.new
53 @item.attributes = @item.permit_params params
54 @item.overwrite @operators
55 @binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
56 @panel = @my_model_class.destination_model.show(@item.destination_id, @operators) if @item.destination_id
58 leaf_render_create play_comic_path(@binder)
63 @item = @my_model_class.edit(params[:id], @operators)
65 @item.attributes = @item.permit_params params
66 @item.overwrite @operators
67 @binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
68 # no check permission for destination
69 # swapable hidden panel
70 #@panel = @my_model_class.destination_model.show(@item.destination_id, @operators) if @item.destination_id
72 leaf_render_update ot, play_comic_path(@binder)
77 @item = @my_model_class.edit(params[:id], @operators)
78 @binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
79 render_destroy play_comic_path(@binder)