OSDN Git Service

temp
[pettanr/pettanr.git] / app / controllers / license_groups_controller.rb
index 8a84314..3c90807 100644 (file)
@@ -2,22 +2,18 @@ class LicenseGroupsController < ApplicationController
   layout 'test' if MagicNumber['test_layout']
   before_filter :authenticate_admin!, :only => [:list, :browse]
   
+  @@model = LicenseGroup
   def index
-    @license_groups = LicenseGroup.list()
+    set_filer
 
     respond_to do |format|
-      format.html {
-        render :template => 'system/filer', :locals => {
-          :items => @license_groups, :model => LicenseGroup, 
-          :roles => [@user, @admin], :pager => nil
-        }
-      }
-      format.json { render json: @license_groups.to_json(LicenseGroup.list_json_opt) }
+      format_filer format
+      format.json { render json: @items.to_json(@@model.list_json_opt) }
     end
   end
 
   def show
-    @item = LicenseGroup.show(params[:id])
+    @item = LicenseGroup.show(params[:id], @operators)
     respond_to do |format|
       format.html {
         @license_group = @item