OSDN Git Service

fix: local manifest/add helper
[pettanr/pettanr.git] / app / controllers / scrolls_controller.rb
index 62dd4b3..f95ade4 100644 (file)
@@ -10,10 +10,6 @@ class ScrollsController < ApplicationController
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
   end
   
-  def self.model
-    Scroll
-  end
-  
   def index
     filer_list
   end
@@ -28,9 +24,9 @@ class ScrollsController < ApplicationController
   
   def show_html_format format
     format.html {
-      play_list = Locmare::ListGroup.list 'scroll_panel', 'play'
-      @play_count = play_list.count(@operators, 
-        {:id => @item.id, :my_play => @item.own?(@operators)}
+      @play_list = Locmare::ListGroup.list(
+        'scroll_panels', 'by_scroll', @operators, 
+        {:id => @item.id, :page_size => -1}  # set no limit options}
       )
     }
   end
@@ -50,26 +46,14 @@ class ScrollsController < ApplicationController
     respond_to do |format|
       format.html {
         if @item.own? @operators
-          @fresh_panel_items = assist_items('panel', 'public')
-          @new_panel_items = assist_items('panel', 'private')
+          @fresh_panel_items = assist_items('panels', 'index')
+          @new_panel_items = assist_items('home', 'panels')
         end
       }
-      format.json { render json: @items.to_json }
+      list_json_format @list, format
     end
   end
   
-  def count
-    list_count
-  end
-  
-  def count_by_author
-    list_count
-  end
-  
-  def count_by_panel
-    list_count
-  end
-  
   def new
     form_new
   end