OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
temp
[pettanr/pettanr.git]
/
app
/
controllers
/
speech_balloons_controller.rb
diff --git
a/app/controllers/speech_balloons_controller.rb
b/app/controllers/speech_balloons_controller.rb
index
03be3ac
..
9247534
100644
(file)
--- a/
app/controllers/speech_balloons_controller.rb
+++ b/
app/controllers/speech_balloons_controller.rb
@@
-10,24
+10,24
@@
class SpeechBalloonsController < ApplicationController
end
before_filter :authenticate_admin!, :only => [:list, :browse]
end
before_filter :authenticate_admin!, :only => [:list, :browse]
+ @@model = SpeechBalloon
def index
def index
- @page = SpeechBalloon.page params[:page]
- @page_size = SpeechBalloon.page_size params[:page_size]
- @speech_balloons = SpeechBalloon.list(@page, @page_size)
+ set_filer
respond_to do |format|
respond_to do |format|
- format.html {
- @paginate = SpeechBalloon.list_paginate(@page, @page_size)
- }
- format.json { render json: @speech_balloons.to_json(SpeechBalloon.list_json_opt) }
+ format_filer format
+ format.json { render json: @items.to_json(@@model.list_json_opt) }
end
end
def show
end
end
def show
- @
speech_balloon = SpeechBalloon.show(params[:id], [@user, @admin]
)
+ @
item = SpeechBalloon.show(params[:id], @operators
)
respond_to do |format|
respond_to do |format|
- format.html # show.html.erb
- format.json { render json: @speech_balloon.to_json(SpeechBalloon.show_json_opt) }
+ format.html {
+ @speech_balloon = @item
+ }
+ format_prof format
+ format.json { render json: @item.to_json(SpeechBalloon.show_json_opt) }
end
end
end
end
@@
-50,6
+50,7
@@
class SpeechBalloonsController < ApplicationController
end
def new
end
def new
+ raise Pettanr::NotWork unless @author.working_panel
@speech_balloon_template = SpeechBalloonTemplate.show params[:speech_balloon_template_id], @author
@panel = Panel.edit(@author.working_panel, @author)
@speech_balloon_template = SpeechBalloonTemplate.show params[:speech_balloon_template_id], @author
@panel = Panel.edit(@author.working_panel, @author)
@@
-82,6
+83,7
@@
class SpeechBalloonsController < ApplicationController
end
def create
end
def create
+ raise Pettanr::NotWork unless @author.working_panel
SpeechBalloon.fold_extend_settings params
@panel = Panel.edit(@author.working_panel, @author)
@speech_balloon = SpeechBalloon.new
SpeechBalloon.fold_extend_settings params
@panel = Panel.edit(@author.working_panel, @author)
@speech_balloon = SpeechBalloon.new