1 class HomeController < ApplicationController
2 before_action :authenticate_user, :only => [
3 :index, :show, :profile, :configure, :create_token, :delete_token,
4 :scrolls, :scroll_panels, :comics, :comic_stories, :stories, :story_sheets,
5 :sheets, :sheet_panels,
6 :panels, :panel_pictures, :speech_balloons, :balloons, :speeches, :ground_pictures, :ground_colors
8 before_action :authenticate_author, :only => [
9 :scrolls, :scroll_panels, :comics, :comic_stories, :stories, :story_sheets,
10 :sheets, :sheet_panels,
11 :panels, :panel_pictures, :speech_balloons, :balloons, :speeches, :ground_pictures, :ground_colors
13 before_action :authenticate_artist, :only => [:resource_pictures]
22 @author = @operators.author
25 @author.supply_default
28 @author_form = Locmare::Bucket.factory @author.item_name, 'default', @author, true, true, @operators
29 @artist = @operators.artist
32 @artist.supply_default
35 @artist_form = Locmare::Bucket.factory @artist.item_name, 'default', @artist, true, true, @operators
39 if @operators.user.create_token
40 respond_to do |format|
41 flash[:notice] = I18n.t('flash.notice.created', :model => User.human_attribute_name(:authentication_token))
42 format.html { redirect_to({:action => :configure}) }
45 flash[:notice] = I18n.t('flash.notice.not_created', :model => User.human_attribute_name(:authentication_token))
46 format.html { render action: "configure" }
51 if @operators.user.delete_token
52 respond_to do |format|
53 flash[:notice] = I18n.t('flash.notice.destroyed', :model => User.human_attribute_name(:authentication_token))
54 format.html { redirect_to :action => :configure}
57 flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => User.human_attribute_name(:authentication_token))
58 format.html { render action: "configure" }
63 filer_list finder: :find_private, param: @operators
67 filer_list finder: :find_private, param: @operators
71 filer_list finder: :find_private, param: @operators
75 filer_list finder: :find_private, param: @operators
79 filer_list finder: :find_private, param: @operators
83 filer_list finder: :find_private, param: @operators
87 filer_list finder: :find_private, param: @operators
91 filer_list finder: :find_private, param: @operators
95 filer_list finder: :find_private, param: @operators
99 filer_list finder: :find_private, param: @operators
103 filer_list finder: :find_private, param: @operators
107 filer_list finder: :find_private, param: @operators
111 filer_list finder: :find_private, param: @operators
115 filer_list finder: :find_private, param: @operators
119 filer_list finder: :find_private, param: @operators
122 def resource_pictures
123 filer_list finder: :find_private, param: @operators