1 class HomeController < ApplicationController
2 before_filter :authenticate_user, :only => [
3 :index, :show, :profile, :configure, :create_token, :delete_token,
4 :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :resource_pictures, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors
6 before_filter :authenticate_author, :only => [
7 :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors
9 before_filter :authenticate_artist, :only => [:resource_pictures]
18 @author = @operators.author
21 @author.supply_default
24 @author_form = Locmare::Bucket.factory @author.item_name, @author, true, true, @operators
25 @artist = @operators.artist
28 @artist.supply_default
31 @artist_form = Locmare::Bucket.factory @artist.item_name, @artist, true, true, @operators
35 if @operators.user.create_token
36 respond_to do |format|
37 flash[:notice] = I18n.t('flash.notice.created', :model => User.human_attribute_name(:authentication_token))
38 format.html { redirect_to({:action => :configure}) }
41 flash[:notice] = I18n.t('flash.notice.not_created', :model => User.human_attribute_name(:authentication_token))
42 format.html { render action: "configure" }
47 if @operators.user.delete_token
48 respond_to do |format|
49 flash[:notice] = I18n.t('flash.notice.destroyed', :model => User.human_attribute_name(:authentication_token))
50 format.html { redirect_to :action => :configure}
53 flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => User.human_attribute_name(:authentication_token))
54 format.html { render action: "configure" }
106 def resource_pictures