OSDN Git Service

temp
[pettanr/pettanr.git] / app / controllers / license_groups_controller.rb
1 class LicenseGroupsController < ApplicationController
2   layout 'test' if MagicNumber['test_layout']
3   before_filter :authenticate_admin!, :only => [:list, :browse]
4   
5   @@model = LicenseGroup
6   def index
7     set_filer
8
9     respond_to do |format|
10       format_filer format
11       format.json { render json: @items.to_json(@@model.list_json_opt) }
12     end
13   end
14
15   def show
16     @item = LicenseGroup.show(params[:id], @operators)
17     respond_to do |format|
18       format.html {
19         @license_group = @item
20       }
21       format_prof format
22       format.json { render json: @item.to_json(LicenseGroup.show_json_opt) }
23     end
24   end
25
26   def list
27     @license_groups = LicenseGroup.all
28
29     respond_to do |format|
30       format.html { render layout: 'system' }
31     end
32   end
33
34   def browse
35     @license_group = LicenseGroup.find(params[:id])
36
37     respond_to do |format|
38       format.html { render layout: 'system' }
39     end
40   end
41 end