OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / controllers / scrolls_controller.rb
index 1bf5dc5..62a8413 100644 (file)
@@ -4,7 +4,7 @@ class ScrollsController < ApplicationController
     before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
   else
-    before_filter :authenticate_reader, :only => [:top, :index, :show]
+    before_filter :authenticate_reader, :only => [:top, :index, :show, :play]
     before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
   end
@@ -28,7 +28,11 @@ class ScrollsController < ApplicationController
     @scroll = Scroll.show(params[:id], [@user, @admin])
 
     respond_to do |format|
-      format.html # show.html.erb
+      format.html {
+        if @author
+          @new_panels = Panel.mylist(@author, 1, 5)
+        end
+      }
       format.json { render json: @scroll.to_json(Scroll.show_json_opt) }
       format.atom 
       format.rss