1 class ComicsController < 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, :play, :by_story, :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]
25 def show_html_format format
27 @play_list = Locmare::ListGroup.list(
28 'comic_stories', 'by_comic', @operators,
29 {:id => @item.id, :page_size => -1} # set no limit options
36 respond_to do |format|
37 show_html_format format
38 show_prof_format format
39 show_json_format format
47 @finder.per(-1) # no limit no pager
49 respond_to do |format|
51 if @item.own? @operators
52 @new_story_items = assist_items('home', 'stories', finder: :find_private, param: @operators)
55 list_json_format @finder, format
69 @item = @my_model_class.new
71 @my_model_class.fold_extend_settings params[@my_model_class.item_name]
72 @item.attributes = @item.permit_params params
73 @item.overwrite @operators
79 @my_model_class.fold_extend_settings params[@my_model_class.item_name]
80 @item.attributes = @item.permit_params params
81 @item.overwrite @operators
87 @item = @my_model_class.edit(params[:id], @operators)
88 render_destroy '/home/' + @item.path_name