1 class HomeController < ApplicationController
2 before_filter :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_filter :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_filter :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" }
122 def resource_pictures